In February, we added support for Backdrop CMS to DDEV-Local. In this post, I’ll show you how to use DDEV-Local to easily create local, PHP based development environments. Ultimately, this allows you to leverage the power of Docker while being much easier to use.
We have an affinity for the Backdrop CMS philosophy
We like the pragmatic philosophy that Backdrop CMS is based on. We agree with letting go of complexity to improve the ease-of-use. We started DDEV with a foundation in best practices which are baked into the development environment. Like Backdrop CMS, we take an opinionated position so our tools have a “just works” user experience for developers. It is possible to extend DDEV as needed, yet the defaults take care of most day-to-day situations so you can eliminate headaches and develop with confidence.
Let’s look at how to get started using Backdrop CMS with DDEV-Local.
Quick Start Guide for Backdrop CMS
The following is the simplest, 4-step path to get a new Backdrop site up.
- Install DDEV
- Clone or download Backdrop CMS
- Configure your project
- Start!
1. Install DDEV
There are a few ways to install DDEV, including macOS homebrew (recommended), an install script, or a manual download of the binary.
We keep the number of dependencies minimal by design. At a minimum, you need Docker and Docker Compose. If you’re using Windows, this means you’ll need Windows 10 Pro to install Docker for Windows.
2. Clone Backdrop CMS
To start you’ll get the files you need for your project. This assumes you’re setting up a new Backdrop CMS project, but you could be cloning an existing project too.
git clone git@github.com:backdrop/backdrop.git cd backdrop git checkout tags/1.10.0
3. Configure your project
This is a one-time configuration step which adds a hidden directory to your project folder with the project configuration files.
There are two options to configure your project.
You can run ddev config and answer three questions:
- Project name
- Root directory
- Project type
Alternatively, you can specify your answers using flags. Here’s an example.
ddev config --project-name backdrop-demo --project-type backdrop --docroot ./
4. Start
Now you’re ready to start. Any time you want to begin working on your project type
ddev start
At this point, you will see containers being downloaded and spun up. Once that is complete, you should receive a message that your site is ready to go and is accessible at http://backdrop-test.ddev.local or https://backdrop-test.ddev.local, which will direct you to the install page.
You can find the database credentials by running:
ddev describe
Putting it all together
Once you’ve done this a few times, it’s typical to cycle through this entire process in 1-2 minutes. If you already have DDEV installed, you could script this as follows:
cd ~/Desktop git clone git@github.com:backdrop/backdrop.git cd backdrop git checkout tags/1.10.0 ddev config --project-name backdrop-demo --project-type backdrop --docroot ./ ddev start
Going further
You can find all the details in our Get Started Guide and in the community documentation.
- Project Info: Run ddev describe to access database credentials and other services.
- Developer Tools: Access Mailhog, PHPMyAdmin, and more right out of the gates.
- Hooks: Common tasks you need to run can be version controlled and shared.
- List: Running two or more projects? Run ddev list to keep on top of them all.
- Additional Services: Add new containers (e.g. Apache Solr) quickly.
Drush in the web container is not yet supported but is a high priority. See the Backdrop quickstart.
Updates since we rolled out support for Backdrop CMS
We’ve had five DDEV releases since we announced support for Backdrop CMS. Since then we’ve added some improvements which are especially useful for Backdrop CMS users.
- v0.14.0 – Allowing Backdrop specific Nginx configurations.
- v0.15.0 – The ability to override configurations for PHP and MySQL, better log file access, faster load times.
- v0.16.0 – Faster default performance, generate the database configuration files earlier, improved Windows support.
- V0.17.0 – Multiple hostnames for a project (all at *.ddev.local), and many performance and bug fixes.
- v0.18.0 – Simplified XDebug, a Windows installer, and smoother upgrade paths.
For future updates and additional information, check out our blog and sign up to our newsletter.
Need some help?
DDEV is an open source project, with a growing community. We support DDEV on Stack Overflow too, just search for DDEV (or questions tagged ddev) there. Find a bug? Have a feature proposal? Visit the issue queue on GitHub.