DEV Community

Vojta Biberle
Vojta Biberle

Posted on

I discovered new Wordpress local dev-env

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

Wodby logo

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 ;-)

Wodby free

Installation

Process of installation is pretty clear, here are just a few adjustments I did.

  1. 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
  2. I change $PROJECT_BASE_URL only to $PROJECT_NAME.local - this is shorter :-)
  3. I uncomment mounted volumes for MariaDB, because persistent data are better (you can mount it only with - ./database:/var/lib/mysql)
  4. If you have an issue with non-starting MariaDB just try another MariaDB tag in your .env
  5. You don't need manually change wp-config.php. Just point your browser to Wordpress and let the installer do everything for you
  6. Uncomment Adminer section in docker-compose.yml - just my personal preference
  7. Uncomment NGINX_SERVER_ROOT for Nginx and add /web to the end
  8. run make up
  9. 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)