Bootstrapping A WordPress Server With Our Scripts
As mentioned in one of our requirements documents, using the WPCloud Deploy plugin presents a chicken-and-egg problem. It requires an existing WordPress installation in order to work. Most users will have one of these already or you can spin up a basic DigitalOcean instance with one already configured for you.
But, if you really really want to start from scratch and use our scripts to bootstrap the initial server, you can do it. You just have to be willing to get down into the command line. So, here is a summary of the steps that you should use to create this initial WordPress server.
- 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
- Spin up a basic 18.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 free tool called BitVise to connect to the server and upload the files using drag-and-drop. But, of course, you can use 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 three commands. These ensure that the txt files have the correct line endings for linux:
sudo dos2unix 01-prepare_server.txt
sudo dos2unix 02-install_wordpress_site.txt
sudo dos2unix 04-manage_https.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 ./dos2unix 04-manage_https.txt
You should now have a working site with SSL enabled. You can upload the WPCLOUD DEPLOY plugin to that installation and start connecting it to your cloud providers.
More Topics In WPCloud Deploy Core