Lightsail is the easiest way to have your own WordPress on Amazon: you choose the blueprint and the size and within a minute the website is running, for a fixed monthly price. The hard part is not creating it; it is what comes afterwards. A freshly created WordPress has an address that changes on reboot, has no padlock, has its admin door open to the whole internet and makes no backups. This guide creates the website and fixes those five things, in order.
Before you start: what each thing means
- Lightsail
- The simple version of Amazon's servers: machines with a fixed monthly price and their own console designed to keep things uncomplicated.
- Blueprint
- A machine already prepared with an application installed. The WordPress one is maintained by Bitnami, a company that packages applications for Amazon.
- Plan
- The size of the machine (processor, memory, disk) and its monthly price. It can be increased later with a snapshot.
- Static IP
- A fixed internet address for your machine. Without it, the address changes when you stop and start and the website can no longer be found.
- DNS and A record
- The "phone book" of the internet. The A record is the line that says your domain points to the machine's IP.
- HTTPS
- The secure connection, the one with the padlock. You get it with a free certificate from Let's Encrypt.
- Firewall
- The machine's doorman: which doors (ports) are open and for whom. It is managed from the Lightsail console.
- Snapshot
- A complete copy of the machine at a given moment, to restore if something breaks.
Step by step
Create the machine from the WordPress blueprint
In the Lightsail console, Create instance. Choose the region closest to your visitors (for Spain, Paris or Ireland). Under "Select a blueprint", Apps + OS tab, click WordPress. Choose the plan: for a normal website one of the small ones is enough and you can grow later. Give it a recognisable name (
web-empresa) and click Create. In a couple of minutes the status changes to "Running".Log in to WordPress with the initial password
Click the machine and then the Connect using SSH button (terminal icon). In the black window that opens, type:
cat bitnami_application_passwordIt shows you the WordPress administrator password. The user is
user. Openhttp://IP-de-la-maquina/wp-adminin the browser (the IP is shown on the machine's card), log in and, first of all, change that password to one of your own under Users, Profile.Set a static IP
Machine's Networking tab, Create static IP, select the machine and give it a name. It is immediate and, while it is attached, there is no extra cost. From now on the address will not change.
Point your domain
In your domain's DNS (Route 53 or another), create an A record with the domain pointing to the static IP, and another for www. In a few minutes (sometimes hours)
http://midominio.comwill open your WordPress. If your DNS is not in Route 53 and you would like it to be, there is a guide in this section.Add the HTTPS padlock
First, in the Networking tab, add the HTTPS (443) rule to the firewall if it is not there. Then, in the machine's terminal:
sudo /opt/bitnami/bncert-toolAnswer the questions with your domain (with and without www), say yes to redirecting to HTTPS and enter your email. In a couple of minutes the website has a padlock and the certificate will renew on its own. Go back to WordPress, Settings, General, and check that both addresses start with
https://.Close what should not be open and turn on backups
Networking tab: edit the SSH (22) rule to restrict it to your IP (guide in this section), leaving access from the Lightsail browser ticked. Snapshots tab: turn on automatic snapshots at an early-morning time. With this the website has a fixed address, a domain, a padlock, a closed door and daily backups. What almost nobody does on day one, done.
What can go wrong
I cannot find the password or the terminal gives an error
Wait until the machine has been "Running" for a couple of minutes: the first time it takes a while to finish installing. If the terminal opens but the file does not exist, type ls to see what is in the folder; the exact name is in the Bitnami documentation.
The website is slow or falls over with little traffic
The smallest plans fall short with WordPress and many plugins. Look at the Metrics tab: if the CPU is always at its limit, move up a plan with a snapshot (guide in this section) or cut down on plugins. A caching plugin helps a lot.
The Bitnami banner appears in the corner
It is removed from the terminal with sudo /opt/bitnami/apache/bnsupport/bnconfig --disable_banner 1 (or the variant Bitnami indicates for your version) and by restarting Apache.
I want to move a website I already have on another host
Install a migration plugin on the new WordPress (there are several well-known ones), export from the old one and import here. Change the DNS at the end, once the copy works. Until then you can test the new website by its IP.
In Simplio
In Simplio you create the Lightsail machine with the WordPress blueprint from the same screen where you see the rest of your machines, with the static IP and the firewall closed to your IP ticked at creation, and you launch the Let's Encrypt certificate from the script catalogue by typing only the domain. Scheduled backups and alerts for a stopped machine or a certificate about to expire are active with no extra steps.
The same task, in AWS and in Simplio
| In the AWS console | In Simplio | |
|---|---|---|
| Create the machine | Lightsail console, 1 screen, 2 minutes | From Simplio, 1 screen, 2 minutes |
| Fixed IP, domain, padlock, close SSH, backups | 4 different tabs, 1 terminal and about 25 minutes the first time | Tick boxes when creating the machine and a Let's Encrypt script from the catalogue: 3 minutes |
| Next WordPress | Do it all over again | The same, and with alerts and backups already in place |