TL;DR If you are comfortable with Docker and Docker Compose, you can go straight to the GitHub repo and get started. For the everyone else, read on…
[8 Nov 2026 Update: Okay, so WordPress 5 is an older version, as are some of the versions of the software in this document. But this approach is still applicable for current versions of WordPress and MySQL/MariaDB, and I still use it as of this writing. If nothing else, it made patching the recent PHP vulnerability a breeze.]
When I stood up this website, I wanted to do so in Docker, but I ran into an issue: the official WordPress Docker image runs Apache. Apache is a nice webserver for small amounts of traffic, but it does not scale well. As more concurrent connections come into a server running Apache, more copies of the httpd process are forked, which causes RAM usage to go up. Having RAM usage regularly go up and down is not ideal.
Fortunately, there is a better way. The Nginx webserver, combined with PHP running in FPM mode scales much better as the memory usage is more constant, which means that peak loads on the server won’t cause you to thrash the swapfile. Encryption would also be nice, so I wanted to have some SSL going as well.
I couldn’t find any existing solutions, so I built one! In this post, I’m going to walk through each piece of the puzzle.
Continue reading “WordPress in Docker with Nginx and LetsEncrypt”







