diff --git a/.env.example b/.env.example index ca98772..c19c2f3 100644 --- a/.env.example +++ b/.env.example @@ -7,6 +7,7 @@ SCRIPT_DEBUG=true GRAPHQL_DEBUG=true WP_DEBUG=true WP_DEBUG_DISPLAY=false +SQLITE_JOURNAL_MODE=WAL # https://roots.io/salts.html AUTH_KEY= diff --git a/bootstrap.php b/bootstrap.php index e253ac1..b300e1c 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -16,6 +16,9 @@ define('LOGGED_IN_SALT', $_ENV['LOGGED_IN_SALT']); define('NONCE_SALT', $_ENV['NONCE_SALT']); +// Database +define('SQLITE_JOURNAL_MODE', $_ENV['SQLITE_JOURNAL_MODE'] ?? 'WAL'); + // Development define('SAVEQUERIES', $_ENV['APP_ENV'] !== 'production'); define('WP_DEBUG', true); diff --git a/composer.json b/composer.json index fe12a39..7aea1b2 100644 --- a/composer.json +++ b/composer.json @@ -50,11 +50,9 @@ "@php composer run install:clear", "@php composer run install:env", "@php composer run install:db", - "@php composer run install:db-update", "@php composer run install:core", "@php composer run install:theme" ], - "install:db-update": "@php -r \"system('sqlite3 ./public/content/database/.ht.sqlite \"PRAGMA journal_mode=WAL;\"');\"", "install:clear": "@php -r \"is_dir('public/wp/wp-content') && system('rm -fr public/wp/wp-content');\"", "install:core": "./vendor/bin/wp core install --admin_user=admin --admin_password=password --admin_email=admin@example.com --skip-email --url=http://litepress.test --title=WordPress", "install:db": "@php -r \"file_exists('public/content/db.php') || copy('public/content/plugins/sqlite-database-integration/db.copy','public/content/db.php');\"",