logo

Creating Lightweight Development Environments for WordPress and Drupal with Docker

For a recent set of plugin development projects, I needed quick, reliable, and isolated environments to test builds and debug functionality across both WordPress and Drupal platforms. I didn’t want the overhead of setting up full development stacks on my local machine for each CMS. Instead, I built lightweight and portable environments using Docker, MariaDB, and Ngrok to cover all my bases—from database support to secure HTTPS tunnelling.


Why Docker?

Docker provides a container-based approach that lets me spin up reproducible environments with minimal configuration. For testing WordPress and Drupal plugins, this means:

  • No dependency conflicts with other local setups.
  • Easy cleanup and restart when things go wrong.
  • Version control over infrastructure via docker-compose.
  • Lightweight and fast-to-start environments.

Adding MariaDB and Ngrok

Both setups use MariaDB for database support—it's a drop-in replacement for MySQL and generally performs better for my use cases.

To expose the local environments securely and quickly to the web (e.g., for webhook testing or collaboration), I integrated Ngrok for HTTPS tunnelling. This lets me test "live" features like OAuth flows and webhooks without deploying to a remote server.


The Repositories

WordPress Docker Environment

📦 GitHub: docker-dev-wordpress

This setup includes:

  • A WordPress container with the latest version pre-installed.
  • MariaDB for the database layer.
  • Ngrok configured via a ngrok.yml file for HTTPS tunnelling.

It's ideal for plugin development, theme testing, or even just getting familiar with WordPress in a sandboxed environment.


Drupal Docker Environment

📦 GitHub: docker-dev-drupal

This mirrors the WordPress setup but swaps in Drupal 11, with all environment variables and configuration tailored specifically for Drupal.

It’s a quick way to:

  • Test custom modules.
  • Play with the latest Drupal releases.
  • Build and iterate on decoupled integrations.

Why This Matters

These environments help keep development focused and fast. No waiting on hosting providers. No messing up your local machine. Just code, run, test, and destroy—all in minutes.

If you're also building plugins or modules for either CMS, I highly recommend cloning the repositories and spinning them up. They’ve saved me hours of time and countless headaches.


Got feedback or want to contribute? Feel free to open a PR or raise an issue on GitHub. You can find both projects here: