Amazon Lightsail is the easiest way to get started with AWS for developers who just need virtual private servers. Lightsail includes everything you need to launch your project quickly – a virtual machine, SSD-based storage, data transfer, DNS management, and a static IP – for a low, predictable price.
Today we are launching your first Virtual Server on Amazon Lightsail to deploy WordPress CMS. Before configuring your server, you need to register your account (if you don’t have it) on Amazon AWS, verify your credit card (Amazon won’t charge you until the order enters the shipping process)
Open your console : https://console.aws.amazon.com/ and click on – Lightsail service
Then click on “Create instance”. Amazon will offer you to choose the closest Region (Zone) where your Virtual Server will be located. You can leave it by Default. After that, you have to select the Platform of your server. Choose “Linux / Unix platform”. Subsequently, you need to choose WebApp that you want to be installed on your server, in our case we are installing WordPress.
Finally, you need to choose your instance plan. It depends on your inquiries. If you plan to have less than 20K visitors per month, then you should choose first plan : 3.5 USD per month. It will be more than enough. By the way, Amazon will give you “first month free” present. So you can test everything before paying.
Click on “Create instance” and your Virtual Server starts deploying.
Congratulations, your first Virtual Server is ready to go. As you can see you have already your Public IP : 126.96.36.199. If you open it in browser, you can find installed WordPress CMS. But you need credentials to login and start doing something with your website. Let’s manage your Virtual Server. Click on Terminal icon, it will connect you via SSH to your server.
Let’s see your login and password for WordPress Admin Panel. Execute the following command
Here we go, your login is user and password is W0Iybmj45U5F. Don’t worry, you can change it in WordPress Admin panel later.
Now you can open your web app admin panel on http://188.8.131.52/wp-admin/ using your credentials and start making your new Website.
Chapter 2: Point your domain to AWS Virtual Server
Before pointing domain to AWS server we need to set Statip ip for your virtual machine. At the moment we use Dynamic IP, it means, when you reboot or shutdown your virtual machine it may change.
Follow next steps to get static ip:
- Click on “Manage” on your Virtual machine
- Find Tab “Networking”
- Click on “Create static ip”
- Attach static ip to your instance and “Create”
Here we go, now you have a Static IP Address on your Virtual Machine. Now we have to bind it to your domain.
It’s doesn’t matter you have your domain on GoDaddy or somewhere else. All we need is to change your DNS Records to point it to our new static IP. If you have GoDaddy account, go to DNS Management, and edit type A Record as the following picture. set name “@” and Value “184.108.40.206” (your static IP)
That’s it. Easy-peasy. Now you need to wait while DNS updates all new records. Sometimes it take up to 72 hours. In our case it took just 10 minutes.
Al right, now your domain points to AWS Virtual Server. Let’s check it, go to http://your-domain.com and it should open your WordPress CMS on AWS amazon.
Probably you will need HTTPS (SSL Certificate) for your domain.
The Bitnami HTTPS Configuration Tool is a command line tool for configuring mainly HTTPS certificates on Bitnami stacks, but also common features such as automatic renewals, redirections (e.g. HTTP to HTTPS), etc. This tool is located in the installation directory of the stack at /opt/bitnami.
To launch the Bitnami HTTPS Configuration Tool, execute the following command and follow the prompts:
If you prefer to manually generate and install Let’s Encrypt certificates, follow this alternative approach.
Do not hesitate to ask me any questions in comments.