A WordPress site with Lightsail in one hour

My challenge with my just revived wordpress.com site is the plug-ins. Even paied premium users cannot install plug-ins for diagram, etc. Upgrading to business plan for $33 a month is a bit luxurious for a site just for fun.

14 years ago I prototyped an intranet site in university in an all summer long project with what is referred to as WAMP stack today. It was a pain in my memory. There must be some streamlined way. Luckily in my shopping for managed service, I came across Amazon Lightsail. The annual cost to host a WordPress site would be $55 in US, given that virtually nobody visits it except myself. The cost consists of:

  • Domain registration for $13 a year
  • Lightsail blueprint for $3.5 a month

There are several benefit of using this Lightsail blueprint, such as:

  • You can actually SSH into the EC2 instance. This is important to myself in the habit of probing into how things work;
  • Resources are all packaged into a fixed price plan. Remember the pesky accidental AWS charges?
  • You have the whole LAMP stack pre-installed, with the bitnami image for WordPress;
  • Start small but with scalability.

To start with Lightsail is extremely intuitive. Just click and launch:

There is a good instruction here on YouTube. Once launched successfully, there are some post configurations:

  1. Request a static IP and assign it to the EC2 instance;
  2. Register a domain (within Lightsail, with Route53 or any other domain registrar) and create an A record referencing the IP address;
  3. Create a certificate and set up anto-renewal. Here is an instruction but the steps differ if DNS is managed outside of Lightsail;
  4. Redirect http to https. Refer to the instruction from bitnami;
  5. Export from wordpress.com and import the xml into this little site.

Notice that all services relevant to hosting are packaged into a single service called bitnami. In order to restart service, instead of restarting php, httpd and mysql individually, you can run the following:

# service bitnami stop
# service bitnami start

In fact, in /etc/rc5.d or /etc/init.d, I do not find the individual services for httpd or mysql. There is actually an instance of MySQL database in the Instance:

# mysql -u root -p
mysql > show databases;

There you go! Now the site is live. This little instruction will come in handy for rebuilding when this site is blown away 🙂

Digi Hunch

Leave a Comment