This bolerplate is based on Bedrock, a modern WordPress stack that helps you get started with the best development tools and project structure.
- Better folder structure
- Dependency management with Composer
- Easy WordPress configuration with environment specific files
- Environment variables with Dotenv
- Autoloader for mu-plugins (use regular plugins as mu-plugins)
- Enhanced security (separated web root and secure passwords with roots.io's wp-password-bcrypt)
- PHP >= 7.2
- Composer - Install
- Create a new project:
$ composer create-project silverback/wp-website
- Update environment variables in the
.envfile:
- Database variables
DB_NAME- Database nameDB_USER- Database userDB_PASSWORD- Database passwordDB_HOST- Database host- Optionally, you can define
DATABASE_URLfor using a DSN instead of using the variables above (e.g.mysql://user:password@127.0.0.1:3306/db_name)
WP_ENV- Set to environment (development,staging,production)WP_HOME- Full URL to WordPress home (https://localhost)WP_SITEURL- Full URL to WordPress including/wpsubdirectory (https://localhost/wp)AUTH_KEY,SECURE_AUTH_KEY,LOGGED_IN_KEY,NONCE_KEY,AUTH_SALT,SECURE_AUTH_SALT,LOGGED_IN_SALT,NONCE_SALT- Generate with wp-cli-dotenv-command
- Generate with Roots.io WordPress salts generator
- Add theme(s) via
composer require - Set the document root on your webserver to app
webfolder:/path/to/site/web/ - Access WordPress admin at
https://localhost/wp/wp-admin/
This boliperplate contains a pre-configured Docker environment with dedicated WP and MySQL containers.
You can find a Visual Studio Code development guide in the .devcontainer folder (recommended) or you can manually launch it via docker-compose.yaml file.
This boilerlate is made to be deployed to Google App Engine. Please read the GAE_DEPLOY guide.
Bedrock documentation is available at https://roots.io/bedrock/docs/.