Opening
From time to time I have to build WordPress pages. WordPress is not bad. It's actually good, but I use Docker for development and the official docker images are not great.
I actually managed my own PHP WordPress images about 2 years ago, but they are now deprecated (PHP 7.0 and PHP 7.1) and I don't have time or strength to manage them again.
Let's search for some ready-made solution!
Wodby
Managed stacks and infrastructure for post-container world -- that's their marketing claim.
And not only that. These guys provide us with local development stacks with everything I missed from the official WordPress image.
For example:
- UID/GID out of the box
- xDebug
- tooling for wp-cli
- tooling for composer
And much more. Just check their guide for WordPress: https://wodby.com/docs/stacks/wordpress/local/ -- it's very easy to follow and start developing in WordPress.
Are you interested in Drupal, PHP, Ruby or Python? They have them too.
And bonus? You can use their deployment stack as a developer for free! Great for showing your work to your clients ;-)
Installation
The installation process is pretty clear, here are just a few adjustments I made.
- Do not clone/fork wodby/wordpress-composer but just run
composer create-project wodby/wordpress-composer some-dir --stability dev --no-interactionas written in the repository README.md - I changed
$PROJECT_BASE_URLto just$PROJECT_NAME.local-- this is shorter :-) - I uncommented mounted volumes for MariaDB, because persistent data are better (you can mount it with just
- ./database:/var/lib/mysql) - If you have an issue with MariaDB not starting, just try another MariaDB tag in your
.env - You don't need to manually change
wp-config.php. Just point your browser to WordPress and let the installer do everything for you - Uncomment the
Adminersection indocker-compose.yml-- just my personal preference - Uncomment
NGINX_SERVER_ROOTfor Nginx and add/webto the end - Run
make up - Profit
Closing
This took me more time than I expected for the first run. But now I'm very happy with the dev environment. I have prepared my own template for future projects and I hope I will only need to update dependencies going forward.
Thanks, guys from Wodby!

Top comments (0)