How to Host a WordPress Site on AWS Lightsail

Prathm MorePrathm More
2 min read

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

  1. Log in to AWS Lightsail:
    ๐Ÿ‘‰ Lightsail Console

  2. Click "Create Instance"

  3. Choose the Region (select a region close to your target audience).

  4. Choose a Platform:

    • Select Linux/Unix.
  5. Select a Blueprint:

    • Choose WordPress from the Apps + OS section.
  6. Select an Instance Plan:

    • For a basic WordPress site, start with the $5/month plan.

    • Upgrade as needed based on traffic.

  7. Enter a Name for Your Instance (e.g., my-wordpress-site).

  8. Click "Create Instance"

    • It will take a few minutes to deploy.

๐Ÿ”‘ Step 2: Get WordPress Admin Credentials

  1. Go to "Instances" in Lightsail

  2. Click on Your WordPress Instance

  3. Scroll down and click "Connect using SSH"

  4. Run the following command to get the admin password:

     cat bitnami_application_password
    
    • Copy this password.
  5. 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.

  1. Go to "Networking" in Lightsail

  2. Click "Create Static IP"

  3. Attach it to Your WordPress Instance

  4. 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:

  1. Connect to Your Instance via SSH

  2. Run the following command to install Letโ€™s Encrypt:

     sudo /opt/bitnami/bncert-tool
    
  3. Enter Your Domain Name when prompted.

  4. Follow the on-screen instructions to complete SSL setup.


๐Ÿ“ฆ Step 5: Configure Domain Name (Optional)

If you have a domain (e.g., example.com):

  1. Go to Your Domain Provider (GoDaddy, Namecheap, Route 53, etc.)

  2. 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
      
  3. Save Changes and wait for DNS propagation.

0
Subscribe to my newsletter

Read articles from Prathm More directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Prathm More
Prathm More

Experienced DevOps Engineer with strong background in automating infrastructure, CI/CD pipelines, & cloud services (AWS, Azure, GCP). Proficient in Docker, Kubernetes, Jenkins, terraform & monitoring tools. Skilled in scripting with Python and Bash.