One Droplet Multiple WP with Easy Engine

wordpress stagings with nginx

The ultimate goal of this article is as my personal reference to use single droplet for multiple WordPress installs for staging purpose. Here are what we are going to use:

  1. A domain name
  2. A droplet, Ubuntu 20.04 RAM 2GB

Step 1: Prepare a Domain Name

I’d like to use a domain name for the purpose of organizing staging sites under a dedicated domain for staging. in this sample my domain for staging is webwyze.com. I’ve connected this domain to Digital Ocean as my VPS destination via name server edit.

Point domain to Digital Ocean namerservers:

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

Step 2: Prepare a Droplet

In this sample, I’m using Ubuntu 20.04 which I have tested it is working well with EasyEngine. With a $10/month in Digital Ocean you could get:

  • 2 GB / 1 CPU
  • 50 GB SSD Disk
  • 2 TB transfer

The specs above is sufficient for in my experience to get 5 or 10 stagings and still load fast! For datacenter location, you could choose a location near you for optimum speed.

After you created a droplet you would get a VPS running with a static IP which then you can use to assign to your stagings.

Step 3: Prepare Sub Domain(s)

Since our goals it to be able to run multiple installation under one droplet and one main domain, we are going to need to add several subdomains for multiple installs. From network setting at Digital Ocean we can point out several subdomains to our VPS static IP.

Step 4: Installing EasyEngine

The install process of Easy Engine is straightforward. I usually do a two steps process when using it in a newly created droplet. The first one is to update the droplet, then the second one is to run the ee install.

What is EasyEngine: EasyEngine (ee) is a Python tool to easily manage your WordPress websites with Nginx, supported on Ubuntu and Debian Linux Distributions.

Updating an Ubuntu droplet:

apt get update

Installing Easy Engine

wget -qO ee rt.cx/ee4 && sudo bash ee

Step 5: Installing a WordPress for a Staging

I’d like to have a specific username and password and setup for the staging, which you can preset using one command line, here is what I usually use:

ee site create stagingname.webwyze.com --type=wp --ssl=le --admin-email=info@adipramono.com --admin-user=adi --admin-pass=YourPassword

Explanation:

  • ee site create: to create a staging
  • stagingname.webwyze.com: is a domain name that will be used
  • –type=wp: standard WordPress
  • –ssl=le: let’s encrypt SSL certificate
  • –admin-email: the email that we are going to use
  • –admin-user: the username
  • –admin-pass: the password for your staging