Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.52 KB

README.md

File metadata and controls

40 lines (34 loc) · 1.52 KB

Deploy Multiple WordPress Sites with Docker

Introduction

This is a side project that explores the options to host multiple WordPress sites on a single server (especially with limited resources).

This doc is a brief summary of the major steps to set up multiple WordPress sites with docker. The architecture is shown below:

For single site docker deployment, see https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-docker-compose For overview of other Multiple WordPress sites deployment options, see notes here,
https://github.com/jingking/multiple-wordpress-sites-docker/blob/main/deployment%20options%20for%20multiple%20wordpress%20sites.md

Installation

  • Step 1
    Install docker engine with compose plugin
    https://docs.docker.com/engine/install/

  • Step 2
    Create work directory (e.g. wordpress) and set up folder structure with Nginx config file (http only) and .env file.

  • Step 3
    Define services with docker compose .yml file

    cd wordpress
    sudo docker compose up
  • Step 4
    Request SSL Certificates from Letsencrypt
    sudo docker compose -f ./docker-compose.yml -f ./docker-compose.certbot.yml run certbot
  • Step 5
    Update the Nginx configuration file (add https) and restart webserver
    docker compose stop webserver
    docker compose up -d --force-recreate --no-deps webserver
  • Step 6
    Complete the WordPress sites installation via the browser