Opening
From time to time I have to build Wordpress pages. Wordpress is not bad. Is actually good, but I used Docker for development and official docker images are not great.
I actually managed my own PHP Wordpress images like 2 years ago, but they are now deprecated (PHP 7.0 and PHP 7.1) and I don't have time and strength to manage it again.
Let 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 local development stacks whit all I missed from official Wordpress image.
For example:
- UID/GID out of the box
- xDebug
- tooling for wp-cli
- tooling for composer
And much more stuff. Just check their guide for Wordpress: https://wodby.com/docs/stacks/wordpress/local/ is 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 2 servers for free! Great for showing your work to your clients ;-)
Installation
Process of installation is pretty clear, here are just a few adjustments I did.
- Do not clone/fork wodby/wordpress-composer but just run
composer create-project wodby/wordpress-composer some-dir --stability dev --no-interaction
as is wrote in repository README.md - I change
$PROJECT_BASE_URL
only to$PROJECT_NAME.local
- this is shorter :-) - I uncomment mounted volumes for MariaDB, because persistent data are better (you can mount it only with
- ./database:/var/lib/mysql
) - If you have an issue with non-starting MariaDB just try another MariaDB tag in your
.env
- You don't need manually change
wp-config.php
. Just point your browser to Wordpress and let the installer do everything for you - Uncomment
Adminer
section indocker-compose.yml
- just my personal preference - Uncomment
NGINX_SERVER_ROOT
for Nginx and add/web
to 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 dev-environment. I have prepared my own template for the next projects and I hope I will only update dependencies in future.
Thanks, guys from Wodby!
Top comments (0)