NOTE: This document covers an older version of WPCloudDeploy.
Using the WPCloudDeploy plugin presents a chicken-and-egg problem since it requires an existing WordPress installation in order to work. Most users will have one of these already and might be able to configure it to meet our requirements. If you don’t then you can:
- Deploy a pre-built image at DigitalOcean using this link: https://marketplace.digitalocean.com/apps/wpclouddeploy. This is the simplest option if you’re going to build the server yourself.
- Fireup a basic DigitalOcean instance where WP is already installed and configured for you (DigitalOcean, Linode, Vultr)
- Opt to use our free install service where we’ll install it for you on a server of your choice (as long as it meets the WPCD requirements) – just request the service via a support ticket within 30 days of your license purchase and we’ll get right on it for you. This is our preferred option if you want to use your own custom server. We really really want to do this for you so you can get up and running FAST!
After WordPress is up and running, you can just install WPCD by following our Quick Start instructions.
While we prefer that you use our free installation service or the pre-built DigitalOcean image, if you really Really REALLY want to start from scratch and do it yourself, you can use our scripts to bootstrap the initial server – you just have to be willing to get down into the command line.
Here is how it works (These are the same steps we follow when you request our free install service.)
- Decide where you’re going to host your server. We recommend that you host it in a location away from where the majority of your other servers will be located. So, if you plan on using DigitalOcean for most of your servers then this bootstrapped server might be located at Linode or Vultr or AWS
- Fireup a standard (not minimal) 20.04 UBUNTU server with no additional software installed on it.
- Log into the server and make sure that the dos2unix package is installed. You can do this by running the following commands in sequence
sudo apt-get update -yqm
sudo apt-get install -yqm dos2unix
- Upload the following scripts to the server from the plugin’s includes/core/apps/wordpress-app/scripts/v1/raw folder. We use a product called Termius to connect to the server and upload the files using drag-and-drop. You can also use free tools such as BitVise. or, of course, any other tool you like. The goal is to get these scripts up to a known folder on the server:
- Navigate to the folder where you uploaded the scripts and run the following command. These ensure that the txt files have the correct line endings for linux:
sudo dos2unix *.txt
- While inside the folder where the scripts exist, execute each of the scripts in sequence and follow the on screen instructions. (Before running the https script, make sure you have updated your DNS to point your domain to the server’s ip address)
sudo bash ./01-prepare_server.txt
sudo bash ./02-install_wordpress_site.txt
sudo bash ./04-manage_https.txt
- At this point you have should have a working site with SSL enabled. Now you need to make sure that WP-CRON is going to get fired every 1 min. So execute the following command:
sudo bash ./10-misc.txt
- Choose option 13 from the large list of menu options. The WP-CRON will be configured to fire every 60 seconds and you should be back at the command line.
Now, lets proceed to tweak a few of the web server settings.
Server Configuration Tweaks
We need to modify your site to increase script and web server timeout values.
Edit your new site’s configuration file:
Add the max_execution_time=300; entry to it as shown in this image (notice that the line ends with a semi-colon):
Under the line that starts with client_max_body_size, add the following entries:
Restart the web server:
- Run the 23-fail2ban.txt script to install fail2ban
- Run the 37-backup-configuration.txt script to backup the WPCD configuration periodically to a different folder.
- Run the 08-backups.txt script to setup daily backups AWS S3.
- Run the 12-redis.txt script to add REDIS (recommended if you’re going to be using WooCommerce on the WPCD site).