Let's be real, when we all started learning HTML and CSS for the first time, we all have once wondered on how to make our local repository available for public. On how do all these websites made their way to the internet. Well, worry not, because we will be tackling about how to host your first ever cloud hosted website using WordPress on AWS Lightsail.
What is AWS Lightsail?
AWS Lightsail is a cloud platform designed to simplify the deployment and management of web applications, making it an excellent choice for small businesses, developers, and hobbyists looking for a streamlined alternative to more complex AWS services. Here’s a list of what Lightsail has to offer:
Virtual Private Servers (VPS): Lightsail offers virtual servers that are simple to manage and store your apps in a safe, private setting. Users can choose from a variety of OS options, such as Windows and Linux, or immediately begin a VPS with pre-configured options (such WordPress or other CMS systems).
Containers: Developers can easily deploy containerized apps in Lightsail. Lightsail supports Docker containers which can be very helpful to developers who wants to deploy their app with isolated app environments.
Managed Databases: Lightsail enables users to set up MySQL and PostgreSQL databases. By simply allowing the databases to run independently from the server, it improves security and performance of the deployed app.
Content Delivery Network (CDN): Lightsail allows the users to distribute their app globally by using the AWS’ global content delivery network (CDN) and Amazon CloudFront.
Load Balancers: Lightsail’s load balancing feature provides high availability and resilience during traffic by distributing incoming traffic to several servers. This improves the dependability of expanding website with changing traffics.
SSD-Backed Block Storage: Lightsail also offers SSD-backed storage that is quicker and dependable that old conventional drives. Users can add more block storage that can allow apps to manage more files and data.
Static IP Addresses: Lightsail also give their customers a chance to set their static IP addresses. To make sure that the IP won’t change even if the instance is stopped and restarted.
Domain DNS Management: Users can also manage their domain names thanks to Lightsail’s simple DNS management. This integrates smoothly with apps hosted on Lightsail and makes DNS setup much easier without the need of using third-party DNS providers.
Low and Predictable Pricing: The total cost for all those services is all included in Lightsail’s predictable price structure. This makes it easier for starting developers in managing their budget for their instance.
Integrated Backup and Recovery: Automated snapshots and backup options help protect your data and enable quick recovery, adding to the reliability of your hosted application.
Why use Lightsail?
Easy Set-Up: Lightsail's simple user interface makes it easier for beginners to set up websites without the need of in-depth knowledge about AWS.
Optimized for Small Projects: The target market for Lightsail is for those who find other AWS services complex. Which is ideal for starting businesses, bloggers, and personal projects.
Scalability: Even if the developer decided to switch things up by making their project bigger, lightsail has the ability to upgrade the provided services.
Cost Effective: It is perfect for budget-conscious users because of its predictable pricing.
Let's Start Building!
Pre-requisites
Before we start the demo, here's what you'll need to get started:
- AWS Account, if you don't have one head to aws website to sign up.
- Basic Knowledge of SSH (Optional, but Recommended)
Step 1
Go to your aws console and navigate to Lightsail.
Step 2: Creating your Instance
On your Lightsail dashboard, locate and click create instance.
Step 3: Setting up your Instance
Set up your instance depending on which region you belong. But in order for you to follow the next steps, I recommend you set up yours the same as this demo:
Select Singapore or ap-southeast-1 as your region and Linux/Unix as instance image.
Then, select WordPress
Leave the SSH key as default. You can enable automatic snapshots when creating an instance. But for this demo, to avoid additional charges, do not enable (But this is highly recommended for those who plan to deploy personal projects in the future).
Then, select Dual-stack as network type and the smallest size Lightsail has to offer.
Finally, name your instance. For this demo you may use "MyFirstWeb-Wordpress" as the name.
Step 4: Set up your Static IP Address
Lightsail provides you a public IP address, however it is not static. We need to set up the static IP address for consistent addressing and improved remote access.
Go to your instance and click manage and navigate to networking.
In the networking page, you can see your public IP address that is not static. Below that is "Attach static IP", press that to make that IP address static then identify your static IP. You can use the recommended name.
Step 5: Accessing WordPress Admin
In order to customize your WordPress site, you need to access first the admin.
Navigate to your instance and click connect. This will automatically open terminal window in your browser. This terminal gives you command-line access to your server directly within the Lightsail console. From there, you can run commands, including those to retrieve your WordPress admin password and other configurations.
Then, use these commands
ls to look at the directory. There should be a file there named "bitnami_application_password" which contains the admin password for your WordPress site.
~$ ls
To access the file, use this command
~$ cat bitnami_application_password
You can now see your admin password in terminal.
This instance is now deleted so you can't use the password below
Copy the password by using the remote clipboard below and use it to log in. Type YourStaticIPAddress/admin to access user log in page.
User as username and paste your password below.
And Voilà! You now have your WordPress site on AWS Lightsail.
Disclaimer: After this demo, kindly delete your instance to avoid unexpected additional charges.
And there you have it! You’ve taken your first step into the world of cloud hosting, deploying a live website accessible to anyone online. With AWS Lightsail, you now have a scalable, secure, and cost-effective platform to build, test, and share your projects with the world. Whether you’re a hobbyist experimenting with ideas or a business owner looking to establish an online presence, Lightsail provides an easy-to-manage solution to bring your vision to life.
Happy hosting! And remember, this is only the beginning. There’s a whole world of cloud services out there to explore as you grow.
Top comments (2)
Great guide! AWS Lightsail is a fantastic choice for beginners looking to deploy WordPress with its simple interface and affordable pricing. If you're exploring cloud hosting, Cloudways also offers a user-friendly platform with more flexibility, allowing you to choose between AWS and other cloud providers. It's a great alternative for those who want managed hosting with excellent support. Also, if budget is a concern, Hostinger has affordable options without compromising performance.
thank you for your suggestions! Will try to explore them soon.