WPCloud Deploy Documentation

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.

  1. 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
  2. Spin up a basic 18.04 UBUNTU server with no additional software installed on it.
  3. Log into the server and make sure that the dos2unix package is installed.  You can do this by running the following commands in sequence
    1. sudo apt-get update -yqm
    2. sudo apt-get install -yqm dos2unix
  4. 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:
    1. 01-prepare_server.txt
    2. 02-install_wordpress_site.txt
    3. 04-manage_https.txt
  5. 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:
    1. sudo dos2unix 01-prepare_server.txt
    2. sudo dos2unix 02-install_wordpress_site.txt
    3. sudo dos2unix 04-manage_https.txt
  6. 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)
    1. sudo bash ./01-prepare_server.txt
    2. sudo bash ./02-install_wordpress_site.txt
    3. sudo bash ./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.

Server Configuration Tweaks

Now, we need to modify your site to increase script and web server timeout values.

Edit your new site’s configuration file:

nano /etc/nginx/sites-enabled/your-domain-name

Add the max_execution_time=300 entry to it as shown in this image:


Under the line that starts with client_max_body_size, add the following entries:

  • fastcgi_read_timeout 600;
  • client_header_timeout 600;
  • client_body_timeout  600;


Restart the web server:

  • service nginx restart

Next Steps