Host WordPress on AWS Lightsail

One of the main dilemmas you can encounter is which hosting provider to choose for my website. A simple solution is to use the most well-known player in the cloud market. Nowadays, the leader of the cloud hosting is Amazon with its Amazon Web Services (AWS) platform.

Luckily, we now have Lightsail - a new service from Amazon. It’s an easy-to-use platform which allows you to create and configure a WordPress website within just a few seconds. At the same time, Lightsail has a predictable pricing model. A monthly fee starts from as little as $3.50 with one free month included.

Today we’d like to give you a simple introduction into Lightsail.

A. Create instance

  1. Go to https://lightsail.aws.amazon.com and log in with your AWS account (create one if you haven’t done so yet).
  2. Choose your Region of preference. Typically you’d like to have it where your target audience is located.
  3. Leave Platform and Blueprint default selection: Linux/Unix and WordPress. If you want a multisite install pick WordPress Multisite.
  4. Choose your instance plan depending on your needs: RAM, disk space, Transfer bandwidth. Note: with $3.50 plan you can have one month for free. Start small, then if you need more horsepower in the future, upgrading is super easy.
  5. Hit Create instance button and Voila! You have just created your first Lightsail WordPress website!

B. Getting your access details

  1. It takes a couple of minutes for Lightsail to prepare the instance for you. As soon as you see it saying Running you’re good to go.
  2. Now click the icon on the top right of the instance name to connect your instance and then type this command and hit Enter:

    cat bitnami_application_password
    

  3. Next, select the password of the site and click the clipboard icon in the bottom-right corner like this:

Now you can select the password again and copy it. Bingo! You got your password! Save it somewhere.

To make the website public, you will need to link your domain to the Lightsail instance you’ve just created.

  1. First, we need to assign a static IP address that will never change. Click your instance name, choose Networking tab and click Create static IP button inside the Public IP block. Scroll the page down and confirm it by hitting the Create button. Congratulations! Now you have the static IP address attached to your Lightsail instance.
  2. Now we need to link your domain name to this IP address. We need to create a DNS zone: click Home in the header of the page ‣ Networking Tab ‣ Create a DNS Zone and input your domain then save the changes by pressing Create DNS zone: Here you can see the list of Name servers. Use them to configure your domain name. If you already have a domain name, you can manage it with your registrar like GoDaddy, Gandi or any other. All you need to do is to set NS (Name Servers) to the list of servers we obtained. For example, with GoDaddy you need to click the DNS button next to your domain name, change name servers and set the server URLs from the list like this:

Now go back to Lightsail DNS zone and click + Add record, put @ into Subdomain field, in Resolves to select the only IP we have like shown below:

To save the changes click icon located in the top right.

Now if you load your website in the browser by IP or domain name it will give you the home page of your WordPress website.

Go to http://yourwebsite/admin and use user as login name and the password obtained on step B3.

Migration

If you have an existing Wordpress website and need to migrate it, you could use a plugin for WordPress called All-in-One WP Migration. It comes preinstalled with Lightsail. All you need to do is: activate All-in-One WP Migration plugin and import your copy of the site. Go to Plugins ‣ Installed Plugins and click Activate next to All-in-One WP Migration. Then on the left sidebar menu choose All-in-One WP Migration ‣ Import. Then drag and drop your backup file and follow the instructions.

I hope that you enjoyed reading this tutorial and it was helpful guiding you how to use Lightsail.

If you want to read more about using WordPress on Amazon Lightsail please follow this link: https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-quick-start-guide-wordpress

What are your thoughts?