- alphacodinghub/wordpress-fpm: latest Wordpress release with PHP7 and PHP-FPM7, and with Redis driver installed for Wordpress Redis Object Cache plugin
- nginx: to serve as the web server for Wordpress
- mariadb: to serve as the database server for Wordpress
- redis: to serve Redis Object Cache plugin
In order to use this repo, you will need to have the Docker app management tool set installed on the host. The tool set provides a set of efficient tools to deploy, manage and monitoring Docker apps.
With this repo, you will be able to deplot multiple Wordpress sites on single host very easily.
The only file you need to customize is
.env-template
, which sets some environment varialbles. In this file, you MUST change the below five environment variables to your own values. All other environment variables are optional. The five environment variables are:
- APP_DOMAIN: the main domain you own for deploying WP sites, e.g.
example.com
. - DB_ROOT_PASSWORD: the root password of the Database.
- DB_NAME: the database name. This database is used for Wordpress.
- DB_USER: the user name of the above database for Wordpress to access the database.
- DB_PASSWORD: the database password for Wordpress to access the database.
To deploy a Wordpress website on your VPS, follow the below steps:
git clone https://github.com/alphacodinghub/wordpress-fpm.git
cd wordpress-fpm
Edit the file .env-template
and set appropriate values.
Assume you want to deploy your Wordpress site in the folder /app
, and you name this Wordpress site as myblog
. Run the below command in the repo folder:
bash ./wp-deploy.sh /app/ myblog
The above command will install a Wordpress site in the folder /app
. You can access the site via:
https://myblog.example.com
Note: please replace
example.com
with your own domain.
To deploy more Wordpress sites, just repeat Step 3.
Follow the below steps to set up the Wordpress Redis Object Cache plugin:
- Log into your wordpress site and enter the Dashboard.
- Add new plugin on your Dashboard, find the Redis Object Cache plugin. Click the
Install Now
button to install the plugin.
- After installing the plugin, click the
Activate
button to activate the plugin.
- Go to the
Installed Plugins
from the dashboard. ClickSettings
under theRedis Object Cache
.
- On the
Settind
screen, you will notice that the "Status" isDisabled
. Click theEnable Object Cache
button.
- When the screen is updated you will find the "Status" has changed to
Connected
.