How to Host a WordPress Site on AWS Lightsail
AWS Lightsail makes it easy to deploy a WordPress website with a few clicks. Hereโs a step-by-step guide:
๐ Step 1: Create a WordPress Instance on Lightsail
Log in to AWS Lightsail:
๐ Lightsail ConsoleClick "Create Instance"
Choose the Region (select a region close to your target audience).
Choose a Platform:
- Select Linux/Unix.
Select a Blueprint:
- Choose WordPress from the Apps + OS section.
Select an Instance Plan:
For a basic WordPress site, start with the $5/month plan.
Upgrade as needed based on traffic.
Enter a Name for Your Instance (e.g.,
my-wordpress-site
).Click "Create Instance"
- It will take a few minutes to deploy.
๐ Step 2: Get WordPress Admin Credentials
Go to "Instances" in Lightsail
Click on Your WordPress Instance
Scroll down and click "Connect using SSH"
Run the following command to get the admin password:
cat bitnami_application_password
- Copy this password.
Go to Your WordPress Login Page:
Visit:
http://<Your-Lightsail-Public-IP>/wp-admin
Username:
user
Password: (Paste the password you copied)
๐ Step 3: Configure Static IP
By default, your WordPress instance has a dynamic IP that changes when restarted. Assign a static IP to avoid issues.
Go to "Networking" in Lightsail
Click "Create Static IP"
Attach it to Your WordPress Instance
Update Your Domain DNS (Optional)
- If using a custom domain, update the A record in your domain provider with this static IP.
๐ Step 4: Enable HTTPS (SSL) for Free
For secure access, enable Let's Encrypt SSL:
Connect to Your Instance via SSH
Run the following command to install Letโs Encrypt:
sudo /opt/bitnami/bncert-tool
Enter Your Domain Name when prompted.
Follow the on-screen instructions to complete SSL setup.
๐ฆ Step 5: Configure Domain Name (Optional)
If you have a domain (e.g., example.com
):
Go to Your Domain Provider (GoDaddy, Namecheap, Route 53, etc.)
Edit the DNS settings:
Set the A record to point to your Lightsail static IP.
Example:
Type: A Name: @ Value: <Your Lightsail Static IP> TTL: 300
Save Changes and wait for DNS propagation.