How to quickly and easily create staging/development sites - Self-manage

Hosting WordPress on Amazon Lightsail is a cost-effective way to adopt the cloud and benefit from the security and scale of AWS. By using Seahorse software users have the tools to utilise the flexibility that AWS cloud hosting provides. This tutorial will guide self managed users through the process of creating a staging or development environment from your existing Seahorse integrated instance. This gives users the ability to spin up latest versions of production sites in minutes to deploy, test and review before production deployment. This level of flexibility reimagines the CI/CD process in Lightsail because staging/development sites can shut-down immediately after use minimising costs.

* If you wish to run a trial clone to the Seahorse/AWS environment, please Click Here to navigate to the dedicated trial tutorial.

● Understand the process involved in cloning a production site within your AWS infrastructure

● Managing staging/development sites in AWS Lightsail

About this Tutorial
Time 10-15 minutes      
Cost Licenced Use
Use Case Compute
Products Amazon Lightsail
Level 100
Last Updated November 30, 2020

Step 2: Set AWS Region

In this step, you choose the AWS Region for your WordPress staging website. 

2.1 — Set the AWS Region. This is the Amazon Lightsail Region where your WordPress staging site will be hosted.
In the WP on AWS Plugin interface complete the following steps:
● Navigate to the AWS Setup section
● Navigate to the Update AWS Region subsection
● Select your preferred AWS Region from the drop-down list
● Click on Update AWS Region

Step 3: Prepare the Staging Website's Database

In this step, you prepare the Database. 

3.1 — Create an automated clone of your website’s database.
In the WP on AWS Plugin interface, complete the following steps:
● Navigate to the Prepare Database Status section
● Click on Prepare Database
● The prepared download will then be confirmed and the database status updates

Step 4: Prepare the Staging Website's File System

In this step, you prepare the Staging website’s file system. 

4.1 — Create an automated clone of your website’s file system. This includes your themes,
plugins, images, etc, and will be used to display your Staging website’s content on AWS.
In the WP on AWS Plugin interface complete the following steps:
● Navigate to the File-System Preparation Status section
● Click on Prepare File System
● The progress is indicated by the Progress bar. Progress duration varies depending on
the size of your file and the server on which it is hosted.
When completed, the file system preparation status will be updated.

Step 5: Clone the Prepared File System

Now that your Staging website has been prepared, a copy can be uploaded to AWS.

5.1 — Upload the clone of your website
This includes your database, themes, plugins and images etc and will be used to create your Staging website on AWS.
In the WP on AWS Plugin interface, complete the following steps:
● Navigate to the Clone to AWS Status section
● Click on Clone to AWS
● When complete, the Clone to AWS status will be updated. Progress duration may vary
depending on the size of your file system and the server on which it is hosted.

Step 6: Launch your Staging website on Lightsail

After a copy of your Staging Website has been cloned to AWS, it can now be launched.

6.1 — Run a Migration to view a clone of your Staging WordPress website in Amazon Lightsail.
In the WP on AWS Plugin interface, complete the following steps:
● Navigate to the Launch a Clone of This Staging  Website on AWS section
● Click on Launch AWS
● When complete, the IP address of your Staging website will become available.
Configure security options for your cluster
6.2 — You will receive an email to the address associated with your license which contains links to view your cloned site.
● Click on Download Key to retrieve your SSH Access key.

Step 7: Configure your new Instance from Snapshot

In this step you will learn how to configure your new instance from a snapshot

7.1 Log into your AWS Lighsail Console, navigate to the instance created and click on the Snapshots Tab.

7.2 From here you can ‘+ Create Snapshot’ and ‘Create new Instance’ from the snapshot created

7.3  Select your SSH Key, Enable Auto Snapshots, instance type, and Name your new instance 

Step 8: Create static IP and assign to your instance

In this step you will learn how to create a static IP & assign it to your instance.

8.1 In the Networking tab, click Create Static IP

8.2 Instances in your chosen region not currently assigned to a Static IP will be presented. Selected your instance.

8.3 Set a specific identifier name for your static IP

Step 9: Remove Bitnami Banner

Note: This step is only applicable to users who have launched their site using the Seahorse software before 07.08.21

All instances launched will carry the Bitnami badge on the site footer. In this step, you will learn how to remove it for production release.

9.1 Open your preferred SSH client and run this command:

sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
*The simplest way to connect to your Lightsail instance via SSH is through the Lightsail Console – the terminal is preconfigured here.

Step 10: Create CPU Utilization alarm

In this step we will create a CPU Utilization alarm to monitor your new instance

10.1 Select the metrics tab of your instance

10.2 Choose the CPU Utilization metric and Add Alarm. 

*Our recommendation is greater than or equal to 60% for 2 times in the last 20 minutes. We also advise adding a notification method (email or SMS)

Step 11: DNS update and install of SSL Certificate

The final step is point your domain at the Static IP you created and to install and configure an SSL cert for your domain so the site can run over HTTPS.

11.1 Point your domain at your newly created Static IP

11.2 Once your DNS change has propagated run the following command via your chosen SSH client

sudo /opt/bitnami/bncert-tool

* The bncert tool is self explanatory and will configure a cron to auto renew your cert so the process only has to be run once

11.3 Than It will ask for the domain list you want to install SSL certificate and complete the process.

Step 12: Management Overview Console

Finally here is an overview of the Management Console that is available within your Staging WordPress website on AWS.

12.1 — Once your Staging Website has been launched on AWS Lightsail, a Management Console is available by clicking the WP Manage AWS tab on the Plugin Menu (on the cloned site)

From this Console, key information about your AWS server is available.
Actions can also be carried-out on your AWS Server from within the Management Console, such as:
● Reboot
● Change Tier
● Change Region
● Create Snapshot
● Boot from Snapshot
● Add Alarms


You migrated your WordPress website to run on Amazon Lightsail using Seahorse!

WP Feedback

Dive straight into the feedback!
Login below and you can start commenting using your own user instantly