Bedrock Modern WordPress Stack is a package that helps you set up a WordPress environment at lighning speed with Ansible and Vagrant to work on a site locally or on a server. It setups a better folder structure, makes loading plugins easier, takes care of deployment and puts your WordPress credentials in a safer place.

Features of Bedrock Modern WordPress Stack

Bedrock Modern WordPress Stack is modern because it is using the latest techniques out there to make WordPress development professional fast and easy. I will go though the main features now here below.


In the case of Roots Bedrock it uses composer for the installation of WordPress, phpdotenv and the management of all plugins. Composer is a dependency manager like NPM or bundler for Ruby and helps you manage PHP packages. You can read more about Composer working together with WordPress here, but the  magic of it in Roots projects is that it will automagically install WordPress for you and the earlier mentioned php packages that have been included in the json file. It also allows you to update your installation with easse and add plugins to your setup that will be maintained by composer as well as long as you add the plugin to the json file.

PHP dotenv

PHP dotenv is a setup in which environmental variables are loaded from a .env file. As the author states: “You should never store sensitive credentials in your code. Storing configuration in the environment is one of the tenets of a twelve-factor app.” So basically this is a safer way to store your WordPress configuration data instead of the storing it in a .php file

Folder Structure

It uses a better folder structure.

bedrock site tree

In their wiki Roots explains why the structure is better. Let me summarize it for you:

MU Plugin Auto Loader

Bedrock has an option that allows standard plugins to be required and installed via Composer. Foxaii explains the benefits of this at Roots Discourse:

It enables must-use plugins to be installed via composer and it enables you to declare standard plugins as must-use (meaning that they don’t need to be activated manually and cannot be deactivated from the dashboard).


WP CLI is also included and it is a great command line tool to manipulate WordPress. You can do almost anything you would normally do from the Dashboard with WordPress Core tools or plugins, but with simple commands and less overhead. A few examples:

Bedrock Ansible

Bedrock-Ansible is basically an extension of Bedrock and helps you with easing the deployment of sites and management of sites locally, on staging and production environments. With the awesome use of Roots’ Ansible Playbook you can setup a WordPress environment locally with the entire Bedrock structure, put together a Vagrant Box that runs NGINX, PHP 5.6, MariaDB and WordPress with a database by just filling in a few variables. To me this is what truly makes Bedrock awesome.

To quote from the Bedrock Ansible github page:

Bedrock-ansible will configure a server with the following and more:

And this my friends is truly awesome.


Not only does this get setup locally, but options can be added to push all this to a staging server and or production server. Ansible has var files in which you add your WordPress Dashboard user details, database details, url and so on. This can be done for the local, staging and production server. And you get to add connection details too so you can push all to the server using a shell script.

More on Bedrock Ansible in a soon to be published post. Here is the WordPress LEMP Stack Management with Trellis Post

Leave a Reply

Your email address will not be published. Required fields are marked *