# ☁️ AWS Cloud Project 6

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691794383919/77c14aad-500f-4cac-bf7e-f0d2a199173f.png align="center")

## 🌐Introduction: In this comprehensive guide, we'll take you through the process of deploying a WordPress website on AWS Lightsail. We'll cover everything from setting up your Lightsail instance to configuring a custom domain and leveraging AWS CloudFront for enhanced performance and security.

☁️Deploy web application on AWS Lightsail

🔗 Tags: AWS, Lightsail, WordPress, Custom Domain, CloudFront, Website Deployment

Title: Step-by-Step Guide: Configuring and Deploying WordPress on AWS Lightsail

## Part 1: Deploying WordPress on Lightsail Marketplace

### Step 1: Launching a WordPress Instance

1. Log in to your AWS Management Console.
    
2. Navigate to AWS Lightsail and click on "Create instance."
    
3. Choose the "WordPress" blueprint from the "Select a blueprint" section.
    
4. Configure your instance by selecting the appropriate instance plan and region.
    
5. Give your instance a unique name and click "Create instance."
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691790893910/194e5f54-71f4-4ae5-afd8-1ae90c4ac0f7.png align="center")

### Step 2: Accessing Your WordPress Dashboard

1. Once your instance is running, click on its name to access the management page.
    
2. Find the "Open in browser" option to access your WordPress dashboard.
    
3. Complete the initial setup by providing your website's title, admin username, and password.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691793047298/0f644178-681b-4d03-9132-50e3f4c38b6d.png align="center")

### Assign Static IP

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691791782883/2a12aa4d-9d06-40a4-9212-32a37ef110ec.png align="center")

## Configuring a Custom Domain on Lightsail

### Step 1: Purchasing a Domain (if Needed)

1. Choose a domain registrar (e.g., GoDaddy) and purchase your desired domain name.
    
2. Configure the domain's DNS settings to use AWS Lightsail's DNS servers.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691791432658/c9717054-7cb1-44dd-9582-1712a3ffa382.png align="center")

### Step 2: Setting Up DNS in Lightsail

1. In Lightsail, navigate to the "Networking" tab of your instance.
    
2. Click "Create DNS zone" and enter your domain name.
    
3. Configure DNS records, including A records and CNAME records.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691793490809/a7f1cbd5-55be-4c0a-bcaa-11970aed492a.png align="center")

### Step 3: Updating WordPress Settings

1. Log in to your WordPress dashboard.
    
2. Go to "Settings" &gt; "General."
    
3. Update the "WordPress Address (URL)" and "Site Address (URL)" with your custom domain.
    

[http://44.217.116.136/wp-admin/index.php](http://44.217.116.136/wp-admin/index.php)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691793613918/07488297-9942-45ab-8200-13c7134f11a5.png align="center")

## Part 3: Configuring AWS CloudFront on AWS Lightsail

### Step 1: Creating a CloudFront Distribution

1. Access the AWS Management Console and navigate to AWS CloudFront.
    
2. Click "Create Distribution" and choose the "Web" distribution type.
    
3. Configure your distribution settings, including your custom domain as an alternate domain name.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691790893910/194e5f54-71f4-4ae5-afd8-1ae90c4ac0f7.png align="center")

Access Wordpress through browser

### Step 2: Updating DNS Records

1. In Lightsail DNS, create a CNAME record pointing to your CloudFront distribution domain.
    

### Step 3: Securing CloudFront with HTTPS

1. In CloudFront settings, select your distribution and click "Edit."
    
2. Under the "SSL Certificate" section, choose your custom domain's SSL certificate.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691791053757/957320a1-e328-4361-bd55-85196062b044.png align="center")

Access wordpress instance through SSH

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691790986862/5feb8240-5abc-4b51-a899-c723693f5a0a.png align="center")

# Custom Domain Registration:

Create and assign static ip

## **Domain Configuration**

Go to Domain & DNS from AWS Lighsail

⚙️ **Configure DNS Zone:** After confirming, you'll set up your DNS zone. This is like creating a map for your domain to lead visitors to your website.

📝 **Add DNS Records:** Add essential DNS records – A records, CNAME records, and more. Think of these as signposts guiding visitors to your virtual doorstep.

Create storage bucket for wordpress media

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692042730703/90d6488d-530f-4ae1-b0a1-3efd7a695ba8.png align="center")

Create Distribution

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692042846747/090b0a78-8665-4898-9688-00f06b84559e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692042922077/5c450885-d998-48c2-b062-dc69942df9f6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692042947170/74b9ed88-b19e-4ae0-9b29-1d3a8e23c490.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692043220514/08104852-8063-4e9f-886a-527559543691.png align="center")

Create SSL certificate

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692043353821/9fb54627-0be5-4e52-b1fe-168cc9a278b5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692043430817/07afb8bf-d898-4689-9116-690b1aabc69a.png align="center")

Attach certificate

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692046802454/070b5bff-6528-404a-b33b-de8b81f8a5a7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692046867926/ba9ea593-d3f1-4413-b3fc-dab3ec3c50a2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692046983619/67d2627f-4f8f-48c8-80ae-6f6f27560f37.png align="center")

[https://lightsail.aws.amazon.com/ls/docs/en\_us/articles/amazon-lightsail-connecting-buckets-to-wordpres](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connecting-buckets-to-wordpress)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692049013319/8a103d6b-9ef5-474a-bf47-8c1f8a28a597.png align="center")

[s](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connecting-buckets-to-wordpress)

[d1uesgpufji6a7.cloudfront.net](http://d1uesgpufji6a7.cloudfront.net)

CNAME records are automatically added to Domain

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692044721423/631c4799-94ae-48c7-905f-eb65f1e32f9a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692045156090/16c8baa4-8d53-441c-92d2-e2a273405a3f.png align="center")

STEPS:

1. Create Lightsail wordpress instance
    
2. Create Static Ip
    
3. Assign custom domain
    
4. For Content distribution:
    
    1. Create storage bucket
        
    2. Create distribution
        
    3. Create SSL Certificate
        

Attach storage

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692047914237/18f2e5bb-c0a0-4f7f-a769-a50ec7ad68d5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692048205406/18d7c066-a65b-4de9-82de-662b51602096.png align="center")

[https://lightsail.aws.amazon.com/ls/docs/en\_us/articles/amazon-lightsail-connecting-buckets-to-wordpress](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connecting-buckets-to-wordpress)

configuring https

[https://lightsail.aws.amazon.com/ls/docs/en\_us/articles/amazon-lightsail-editing-wp-config-for-distribution](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-editing-wp-config-for-distribution)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692055570258/339e971a-1ad8-44d7-87c6-d05a5a3181f1.png align="center")

Verify that SSL certificate validated

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692056045055/0141d42f-b9ea-4812-a81a-6368148945f7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692055662338/89c86c5e-511d-4da3-a86e-0474dea7aed2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692055782093/f2a28989-0f42-405a-a859-fe5fc505734e.png align="center")

## Conclusion:

You've successfully deployed a WordPress website on AWS Lightsail and configured a custom domain while optimizing performance and security with AWS CloudFront. By following this step-by-step guide, you've taken a significant step towards building a scalable and secure web presence.

🎉 Congratulations on your WordPress deployment with AWS Lightsail! 🚀

🔗 Tags: AWS, Lightsail, WordPress, Custom Domain, CloudFront, Website Deployment

#AWS #AwsCommunityBuilders#CloudEngineering #CloudComputing #AmazonWebServices #AWSArchitecture #DevOps #CloudSolutions #CloudSecurity #InfrastructureAsCode #AWSCertification #Serverless #AWSCommunity #TechBlogs #CloudExperts #CloudMigration #CloudOps #AWSJobs #TechIndustry #CareerInTech #InnovationInCloud #devops #cloudengineerjobs #devopsjobs #azure #gcp #oci #cloudjobs, #kubernetes
