This is a tutorial on scaling WordPress beyond just multiple instances with a highly scalable static frontend and a trusted backend.
One of the many things people are looking for is a way to have the maximum amount of success with the least amount of effort.
With WordPress, the popular blogging application, you not only have the possibility to scale it up, but also to scale it wide allowing you to separate the logic of the backend (the WordPress interface) from the the frontend.
Let’s have a look at how this “Scalable WordPress” is set up.
Get WordPress
To get started I’m going to install WordPress using Docker. Please refer to the Docker documentation if you haven’t installed Docker on your system yet.
I take the example from Docker Compose to install WordPress with a separate MySQL database.
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
db_data: {}
This will download the WordPress container as well as the MySQL container. Once everything is up-and-running, you can start the process of creating your blog, web shop or whatever it is you want to create with WordPress.
Set up WordPress for publications
After issuing docker-compose up
you can head to http://localhost:8000 to see your freshly installed WordPress installation.
Go through the process of configuring WordPress to your likings and create an account for yourself.
WARNING: The examples shown here are not suited for production usage! Please, please do not run these examples with critical data if you did not changed the passwords and other credentials!
In the next article I’m going to separate the frontend from WordPress to further uncouple the engine and allow for scalability and speed.