Docker WordPress multisite with subdomains

by Sagi Zeevi ·
Published November 22, 2017
· Updated November 20, 2017

The network setup for a WordPress multisite with subdomains can be scary. Nevertheless this post will demonstrate how easy it is to use docker-compose to create such a configuration. In addition it will run on your single local host, and you can use it for development, testing, or whatever you want. In a few simple steps you’ll have a docker WordPress multisite with subdomains!

Why use a docker WordPress multisite with subdomains?

Using subdomains for a web site is not everybody’s cup of tea. But if it is, then the network setup overhead is something which you don’t do very often. Letting developers work independently, testing and even just trying it out before publishing a new site needs to be easy. Therefore, I’m going to show you here just how simple it is to add such a setup using docker-compose and the EXPOSE SERVICE feature from a previous post.

That was all the networking setup!

To start your multisite setup, open your browser at http://mycompanysite.com, start the regular setup for the main site, and then follow these instructions to configure it as a multisite and add your subdomain sites.

Note – in the process you might get a “Warning! Wildcard DNS may not be configured correctly!” – ignore this message and continue.