nickkadutskyi / wp-skeleton
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Nix
Type:project
Requires
- php: >=8.1
- ext-ctype: *
- ext-iconv: *
- symfony/console: 6.4.*
- symfony/dotenv: 6.4.*
- symfony/flex: ^2
- symfony/framework-bundle: 6.4.*
- symfony/runtime: 6.4.*
- symfony/yaml: 6.4.*
- wp-cli/wp-cli: dev-main
- wp-cli/wp-cli-bundle: *
- wpackagist-plugin/akismet: dev-trunk
- wpackagist-theme/twentytwentyfour: *
Requires (Dev)
- roave/security-advisories: dev-latest
Conflicts
README
Project starter for WordPress site
- Symfony is used solely because of its secrets management feature
- WordPress core files are always separate from wp-content and plugins and are managed by WP-CLI
Initiate
# Creates Symfony Vault encription key and sets WP salts for prod and local
scripts/initial.sh
Development
# Install the project composer install # Install all submodules (if exist) git submodule update --init --recursive # Runs installation script (basically downloads WordPress core files of the version specified in wp-cli.yml) scripts/wp-install.sh
Update
# 1. Updates to the latest version (provide any wp core update options to modify update process) scripts/wp-update.sh # 2. If updated wp-cli.yml will be updated to with the newer version for install.sh script to consider. # 3. Commit changes
Production
This is approximately how to update the projecton on production. It should already have produciton decryption key to extract all secrets from production vault
# Assuming that the project is already on production and you want to update it git pull origin main # Updating submodules git submodule update --init --recursive # Deleting local env extracted before because it might interfere with the further extraction rm .env.prod.local # Sets up environtment export APP_ENV=prod # Bring the project to the current state according to composer.lock composer install --no-dev --optimize-autoloader # Extracts secrets from production vault APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force # Converts env file to a single php file (.env.local.php) for performance composer dump-env prod # Clears Symfony cache (if you don't use anything from Symfony then don't need to do this) APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear # Runs installation script (basically downloads WordPress corse file of the version specified in wp-cli.yml) scripts/install.sh # Sets symlink for the wp-content folder to be accessible from the web ln -s /path/to/the/project/src/WordPressContent /path/to/the/project/public-wp/content # Sets ownership to your user and to give access to server (www-data group), change if server group is different. sudo chown -R your-user-here:www-data ./* # Restarts apache, or change it to restart a different type of server sudo service apache2 restart