worms eye view of spiral stained glass decors through the roof

Hosting WordPress On AWS

As fate would have it, Summer 2022 has come with some life changes that include a renewed focus on the long-established business at Charleston Software Associates (CSA). In the decade-plus that the company has been in place there have been several key shifts in focus including the launch of Store Locator Plus® as a multi-faceted location mapping software and SaaS platform. Now, as the Store Locator Plus® business is back as the center of focus for the company, it is time to rebuild the infrastructure that supports it; Including moving all non-locator related assets off of the primary server cluster that “host all things CSA”.

Among the many changes that are underway, moving websites hosted on a classic shared web server to independent hosting on AWS is being implemented.

Existing Website Environment

Many of the websites that are hosted on the shared CSA web presence servers are independent entities unrelated to the Store Locator Plus® project. These sites are hosted on a cluster of EC2 instances with a virtualized web service in place. The configuration works very much like most web hosting companies; One big server (or cluster) with many websites stored in different directories that are managed by the web services configuration.

As such, the details provided below should be nearly identical for any WordPress site hosted at a web presence provider. While some steps may be different, the details provided herein should provide insight into hosting WordPress on AWS.

WordPress On Lightsail

While there are several ways to get WordPress up-and-running on AWS, including using independent servers like EC2, Lightsail is by far the easiest to work while providing extra services every web presence should have.

WordPress instances on Lightsail start at a super-low price of $3.50/month (July 2022). This is vary competitive with nearly any self-managed WordPress solution. In reality, most people never utilize the additional services of a fully managed WordPress installation. The only feature some of those “fully managed” WordPress services offer that is not readily available on AWS Lightsail is a one-click “mirror this site on a staging site” option. For full production business sites this can be useful if your site appearance of software stack is often changing. For most sites hosting simple blogs (like this one) the service is never used.

AWS Lightsail provides a simplified interface for managing your web instance. It includes the ability to add advanced features from the AWS services with a few clicks. The initial configuration sets up a basic web server that is deployed on AWS container services; Don’t worry you don’t need the details as they take care of the setup and management for you. The default configuration will install and configure the services (web server, database, installing WordPress, the OS) needed for a full WordPress hosting presence within a few minutes of creating an instance.

One the service is up and running you can add extra features such as a static IP address to make DNS routing easier. If you business grows you can easily add things like cloud front distribution, a shared database instance and load balancer if the site gets popular enough to need multiple servers. Lightsail walks you through it. If the website gets features on a runaway Tik Tok viral video you can even convert it to the full-fledged EC2-based service stack with minimal effort.

Moving An Existing WordPress Site To Lightsail, Export Tool

AWS provides some great documentation to assist with moving an existing WordPress site over to Lightsail. However, this methodology does NOT copy all the software onto the new server and thus requires extra work to get things “exactly the same”.

The basic steps:

  1. Export your existing site content and download the XML file
  2. Create a Lightsail instance for WordPress
  3. Fetch your WordPress login (username: user , password: stored in a file on the server you get to with a web-based SSH console)
  4. Login to the new instance and import the content
  5. Optional (sort of) assign a static IP to the new lightsail instance
  6. Update the website’s DNS record to point the domain to your new lightsail instance.

Necessary additional steps:

While the instructions above will bring over all of the data you need for the site, what it does NOT do is install all the secondary software that was on the main site. As such you’ll need to:

  1. Install themes from the original site
  2. Install plugins from the original site
  3. Drop any unused themes or plugins that came pre-installed on the Bitnami Lightsail stack

Additional steps to consider:

Since the images provided by Bitnami are generic, there are some tweaks that are common before publishing the site to the world.

  1. Add an SSL certificate via the SSH login
  2. Remove the Bitnami badge from the site via the SSH login
  3. Add a second admin login/password only known to the site owner
  4. Deactivate the user account

Moving An Existing WordPress Site, All-In-One by Servmask

An alternative route for copying over the website is to use the All-In-One WP Migration plugin by Servmask. This tool comes with the default Bitnami image that is installed by AWS Lightsail, saving an additional step on the new server. (Note: I am not affiliated with Servmask or this plugin. Use at your own risk.)

Basic steps:

  1. Install the All-In-One WP Migration plugin on your original site.
  2. Export the site, I prefer to a download file but they have paid extensions to export to many places like S3 or Dropbox.
  3. Create your new Lightsail instance
    1. Assign the instance a static IP once is is running.
  4. Login via SSH to get your password for the admin user “user” on WordPress
  5. While you are there you will likely need to increase the PHP file size limit if your export is more than the 80MB limit all Bitnami WordPress Lightsail images come with and restart the services.
  6. Import your site via the download file — this method also gets all plugins and themes from the original site
  7. Point your domain name to the new static IP.
  8. Configure the SSL certificate.
    1. Login to the Lightsail instance with SSH
    2. sudo /opt/bitnami/bncert-tool

Summary

While AWS Lightsail may not be perfect for every WordPress-based website, it does a great job at providing a solid web presence for most businesses. It can easily be backed up and replicated for testing purposes. The container spin up very quickly. It is low cost. And despite the container-based-all-in-one solution, it performs extremely well even under high volumes of traffic.

Unless you are running a SaaS service, update your website frequently, or a running a web presence for a company with millions of page views every month — Lightsail may work for you. Anyone can get started with this service with minimal technical skills required.

Hosting WordPress on AWS Lightsail is worth a try next time you need a WordPress site.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.