Until recently, we were running this site on a shared hosting service called Hostinger.
To gain more flexibility and better performance for WordPress, we decided to migrate the site to AWS.
Overview of the Migration to AWS
Shared hosting works fine for many websites. However, moving to a cloud environment gives you more control, scalability, and customization — especially when running WordPress in a more optimized setup.
Why AWS Is a Better Environment for WordPress
Shared hosting environments are designed to distribute server resources among multiple users. While this works well for many websites, it also means resources are shared and performance can fluctuate.In contrast, a cloud environment like AWS allows you to configure your infrastructure more precisely. You can control instance types, storage, monitoring, and scaling — giving you greater flexibility and performance optimization for WordPress.
The Reason why we migrate WordPress site to AWS
We decided to migrate to aws because of the reason below:
- The number of pages and the amount of stored images increased as the site grew.
- As traffic expanded, we needed a more scalable and optimized hosting environment.
- We wanted a more cost-efficient infrastructure using AWS.
- We wanted greater control over monitoring and server configuration.
- We also wanted to improve my skills as an AWS engineer.
Let me explain the above in more detail.
Increase of pages and images on WordPress
The larger your site is, the more of a strain it will take to migrate it from shared hosting to a cloud environment.
Migrating your site now, when it is still at a certain size, will reduce the burden of cloud migration.
Increased traffic
As the size of your site grows, the number of visitors to your site will naturally increase.
By building a WordPress site in a cloud environment, we create an environment that can handle the increased traffic volume.
Cost optimization
With shared hosting services, you are charged a fixed amount every month. In cloud environments such as AWS, you are charged only for what you use. If you make extensive use of tools on AWS, your bill will certainly be higher, but by purchasing reserved instances or using the appropriate AWS services, you can keep costs down compared to renting a server, even for small and medium-sized websites.
Optimizing your site environment on AWS
As the number of accesses increases and the data volume of the site increases, it becomes necessary to optimize the site environment using the cloud.
We will explain in detail how we optimized it.
AWS services which We use this time
The AWS services we will use to build the AWS environment for running WordPress are as follows.
- EC2
- S3
- CloudFront
- Route 53
- CloudWatch
- others
AWS offers a service called Lightsail that allows you to use a minimum amount of AWS resources for a flat rate, but in this case we will not use Lightsail in order to create an environment that is more optimal for WordPress.
EC2
EC2 is a service that allows you to launch a virtual server on AWS. By using EC2, you can virtually recreate the state of a single server in an actual physical environment on AWS.
S3
S3 is AWS’s storage for storing files.
CloudFront
Optimize page loading speed by storing WordPress images and other data on S3 and loading them with CloudFront.
Route 53
Route 53 is used to manage domains on AWS.
https://aws.amazon.com/route53
CloudWatch
Get metrics for the virtual server you launched in EC2 to check the status of your EC2 instance.
https://aws.amazon.com/cloudwatch
Other AWS Services
This article does not cover the details of using AWS services for networking and security.
Build a LAMP environment on an EC2 instance
First, We created a LAMP environment on the EC2 instance so that we could use WordPress on the EC2 instance.
First, we created a LAMP environment on the EC2 instance so that we could use WordPress.
When creating this LAMP environment, we took every precaution to create the optimal environment for WordPress, using NGINX instead of Apache as the web server software and MariaDB, which is compatible with MySQL, as the database.
Use Plugins to Optimize WordPress site.
To run a website optimally on AWS, it’s not enough to just focus on the AWS settings. We also worked hard to optimize the site environment by using the most appropriate plugins on the WordPress side.
Conclusion
As the size of a website and the number of visitors increase, shared hosting services no longer provide satisfactory performance, and people begin to consider migrating to a more optimal cloud environment. Our current situation is one example of why we decided to run our website in the optimal cloud environment rather than using a shared hosting service.





