WordPress boilerplate with Composer, easier configuration, and an improved folder structure
Professional WordPress project structure
The organization of Bedrock is similar to putting WordPress in its own subdirectory but with some improvements, including renaming wp-content/
to app/
.
Bedrock structure
Standard WordPress structure
Bedrock
|
WordPress
|
|
---|---|---|
Separate configs per environment | ✅ | ❌ |
Environment variables | ✅ | ❌ |
Custom wp-content directory | ✅ | ❌ |
Composer for managing WordPress installation | ✅ | ❌ |
Composer for managing WordPress plugins and themes | ✅ | ❌ |
mu-plugins autoloader | ✅ | ❌ |
Using Composer with WordPress
Bedrock is an ideal starting point for using Composer with WordPress. Manage your WordPress install and plugins with Composer, a PHP dependency manager. Composer will make development more reliable, help with team collaboration, and it helps maintain a better Git repository.
By default, Bedrock disables the ability for plugins and themes to be added, removed, or modified on non-development environments.
Environment specific configuration
Bedrock uses Dotenv to manage environment specific configuration. Setup different config values based on the environment your site is running in, from a directory structure that is easy to understand.
Enhanced WordPress security
Bedrock’s structure limits access to non-public files and offers more secure passwords through wp-password-bcrypt.
Sponsors
Help support our open-source development efforts
Built with Bedrock
Recommendations
I'm a big fan of Bedrock (and all of Roots in general)
Bedrock is like the bridge between WordPress and the rest of PHP
Roots' distros have been essential to jumping back into WordPress devel after a decade out. Until WP quits being an antiquated, monetized pit of code, this is all that’s holding my sanity in check.
Bedrock is doing a huge service to the WordPress community, and I can see it being adopted as the standard for WordPress development. Hopefully as more people adopt it, the developer community at large will view WordPress sites on similar footing as more “professional” platforms.
If you have to use WordPress, use Bedrock for your web app and Sage to develop your custom theme. Any Laravel developer will feel at home in these tools.
I think 2 years ago I tweeted to y'all to say I love Sage -- now I'm getting started with Bedrock and loving it! thank you for making me feel like WordPress can be sane, secure, and modern.