Introduction
After building my first AWS project—hosting a static website with Amazon S3 and Amazon CloudFront—I wanted to understand what happens when a website needs to generate content dynamically.
Static websites are great for portfolios and documentation, but applications like WordPress require much more than file storage. They need a server to process requests, an application runtime to execute code, and a database to store content.
Rather than configuring all of these components manually, I chose Amazon Lightsail, AWS's simplified virtual private server (VPS) service, to understand the fundamentals of hosting a dynamic web application.
By the end of this project, I had:
- Deployed a WordPress website
- Logged into the WordPress administration dashboard
- Published my first blog post
- Configured a Static IP
- Created a server snapshot for backup and recovery
Static vs. Dynamic Websites
Before starting this project, I wanted to clearly understand why my previous S3 project couldn't host WordPress.
A static website simply serves files that already exist. Every visitor receives the same HTML, CSS, JavaScript, and images without any server-side processing.
A dynamic website is different. Every request is processed by the server, which executes application logic, retrieves information from a database, and generates the webpage before sending it to the user's browser.
WordPress is one of the most common examples of a dynamic web application because every page depends on PHP and a database.
Diagram 1 – Static vs. Dynamic Website
Static Website
Browser
│
▼
Amazon S3
│
▼
HTML • CSS • JavaScript
Dynamic Website
Browser
│
▼
Apache Web Server
│
▼
PHP Runtime
│
▼
MariaDB Database
│
▼
Generated HTML
Because WordPress relies on server-side processing, it cannot simply be hosted in an S3 bucket.
Why Amazon Lightsail?
AWS offers several compute services, including Amazon EC2 and Amazon Lightsail.
For beginners and small projects, Lightsail removes much of the operational complexity while still exposing the key concepts behind cloud infrastructure.
With a few clicks, Lightsail provides:
- A virtual Linux server
- Networking
- Storage
- Static IP support
- Built-in application blueprints
- Predictable monthly pricing
Instead of installing Ubuntu, Apache, PHP, MariaDB, and WordPress individually, I selected the WordPress blueprint and AWS provisioned everything automatically.
This allowed me to focus on understanding the architecture rather than spending time configuring the operating system.
Solution Architecture
The deployed architecture is straightforward but introduces several important AWS concepts.
Diagram 2 – Architecture
Internet
│
▼
Static Public IP
│
▼
Amazon Lightsail Instance
┌─────────────────────────────┐
│ Ubuntu Linux │
│ Apache Web Server │
│ PHP Runtime │
│ MariaDB Database │
│ WordPress Application │
└─────────────────────────────┘
│
▼
Lightsail Snapshot
Each component plays an important role.
- Ubuntu hosts the application.
- Apache receives incoming HTTP requests.
- PHP executes the WordPress application.
- MariaDB stores posts, pages, users, and settings.
- Static IP provides a consistent public endpoint.
- Snapshot enables backup and disaster recovery.
Deployment Walkthrough
- Launching the WordPress Instance Using the WordPress blueprint, AWS automatically created a fully configured environment with Ubuntu, Apache, PHP, MariaDB, and WordPress. This eliminated the need to manually install and configure each component.
- Accessing the WordPress Dashboard After retrieving the administrator password from the instance, I logged into the WordPress admin dashboard. From there, I could manage the website, configure settings, install plugins, and publish content.
- Publishing My First Blog Post To verify that everything was working correctly, I created and published my first blog post. This confirmed that the web server, PHP runtime, and database were communicating correctly.
- Configuring a Static IP Initially, the instance was assigned a temporary public IP address. Since public IP addresses can change if an instance is recreated or restarted, I attached a Static IP. Using a permanent IP address makes it easier to associate the server with a domain name in the future.
- Creating a Snapshot Before deleting the environment, I created a Lightsail snapshot. Snapshots capture the complete state of the server, including:
- Operating system
- WordPress installation
- Configuration
- Database
- Uploaded content This makes it possible to restore the environment if needed.
How a Request Reaches WordPress
Understanding the request flow helped me connect the different components of the architecture.
Diagram 3 – Request Flow
Browser
│
▼
Static IP
│
▼
Apache
│
▼
PHP
│
▼
WordPress
│
▼
MariaDB
│
▼
HTML Response
│
▼
Browser
Every page request follows this sequence before the generated HTML is returned to the user.
Cost Optimization
One of my goals was to complete this project while keeping costs as low as possible.
To achieve this, I:
- Selected the smallest available Lightsail instance
- Did not purchase a custom domain
- Deferred HTTPS configuration because it typically requires a registered domain
- Deleted the instance, Static IP, and snapshot immediately after completing the project Since the environment was only active during development and testing, the actual cost was only a small fraction of the monthly Lightsail plan.
Key Takeaways
This project helped reinforce several cloud concepts that are useful beyond WordPress hosting.
- Dynamic applications require compute resources.
- A web server processes incoming requests before generating a response.
- Databases are essential for storing application data.
- Static IPs provide stable network endpoints.
- Snapshots are a simple but effective disaster recovery mechanism.
- Managed services like Amazon Lightsail simplify infrastructure while still teaching the core principles of cloud computing.
Conclusion
Amazon Lightsail provides an excellent balance between simplicity and functionality, making it an ideal service for learning how dynamic web applications are deployed in AWS.
While the deployment process is straightforward, the project introduces several foundational cloud concepts—including compute, networking, storage, application hosting, and backup strategies—that are applicable across many AWS services.
For anyone beginning their cloud journey or looking for a simple way to host a WordPress application, Amazon Lightsail offers an approachable starting point without requiring extensive infrastructure management.
GitHub Repository
You can find the complete project, documentation, architecture, and screenshots here:
https://github.com/swaralichine/aws-projects/tree/main/01-web-hosting-and-deployment/02-wordpress-aws-lightsail





Top comments (0)