WordPress & Amazon Lightsail – Getting Started


About The Author
Cabe Nolan is the founder of WP Cover where he shares his insight into WordPress, development, & entrepreneurship. Outside of WPCover, Cabe continues to run a successful WordPress development firm, Bold City Design as well as a few high profile websites, Arrivala, Two Way Resume, Dock Skipper, and a successful outdoors brand, DolfinPack.







WordPress & Amazon Lightsail – Getting Started

Amazon Lightsail is an intriguing new product from Amazon Web Services that I’ve been meaning to sit down a play around with for some time.  This weekend, I took the opportunity to spin up a test instance and play around with getting a WordPress site migrated over.

A little background first on Amazon Lightsail.  For starters, it is basically a really simplistic version of an EC2 instance that has become famous with Amazon.  Rather than having to do a lot of the management and server provisioning yourself, Amazon Lightsail lets you get up and running very quickly with minimum server management skills.  This tutorial will walk you through a very simplistic guide of spinning up a new Lightsail instance, getting in via SSH and then gaining access to PHPMyAdmin to upload your exported database.

Let’s jump in:

  1. Our first step is heading over to Lightsail and getting logged in.  This is done at https://aws.amazon.com/lightsail/.
  2. Once we get logged in, it is time to spin up a new instance.  Lightsail provides a 30 day free trial so you can do this at no cost if you just want to play around for a bit and see how it works.  The instance usually takes about 30 seconds to create at which time Lightsail will provide you with a public IP address and username to get logged in via SSH.
  3. Once the new Lightsail instance is spun up, it will provide you with a private key for gaining access via SSH.  Download this private key onto your computer for use with your favorite SSH client.
  4. Next step is changing the permissions on your newly downloaded private key.  I work on OSX so I opened up Terminal and used the following command, “chmod 600 /Users/user/documents/privatekey.ppk” where Users/user/documents was the path to my downloaded private key.  **hint, you can drag and drop the file into terminal and it will automatically insert the path to the file.
  5. Next, following this guide, we’re going to create an SSH tunnel into PHPMyAdmin.  In order to do this, I’m going to run the following command in Terminal: ssh -N -L 2222:127.0.0.1:80 -i /Users/user/documents/privatekey.ppk bitnami@public_IP.  A couple notes on the above: 1. I changed the port from the example guide to :2222 rather than :8888 as I have MAMP running on my computer which uses the :8888 port.  2. Make sure you change the path to your private key file accordingly as well as adding in your public_IP address and Lightsail username in the last expression.
  6. Once I’ve performed the above, I can access PHPMyAdmin at http://127.0.0.1:2222/phpmyadmin
  7. The credentials to login to PHPMyAdmin will be ‘root’ as the username and the password can be found in a file called bitnami_application_password which resides in the root folder after you login via SSH.

Overall, getting started was very simple to do.  AWS is a fantastic product but many are turned off by the complexity of server management and even just getting started.  Lightsail is a great lightweight product that I’m happy to see Amazon come out with.

I will be back with more guides on Amazon Lightsail as I jump deeper myself.  Check back for more info!


Share Your Thoughts

Leave a Reply

Your email address will not be published.


Related Stuff You Might Like







WordPress News, Tips, & Code Snippets

Join the WP Cover mailing list and get wordpress news, tips, code snippets, security warnings, and more delivered right to your inbox.  We won't flood your inbox, newsletters typically go out every 1-2 weeks unless it involves an important security release.

You have Successfully Subscribed!