When it comes to hosting WordPress on AWS, the most common question is, how much will it cost? AWS is notorious for having a complicated pricing structure. Simply perusing their pricing page doesn’t help much, when all you see is this:
This is where the AWS pricing calculator comes in handy. It asks you about the components you wish to use and shows you the approximate cost

The challenge with this calculator is knowing which of the 131 AWS services you need to use in order to run WordPress properly. In this article, we will explore the AWS components you can and should use with WordPress and calculate the monthly cost

**Assumptions**
Hosting is a broad topic with a wide range of potential solutions depending on your workload. For the purpose of this article, we’ll make some assumptions about the WordPress site you plan to host on AWS. At Nestify we see the following use cases come up frequently:
- Hosting 25-30 small WordPress sites on the same server
- Hosting 1 large WooCommerce site with 10-15 transactions per hour
Luckily, both use cases need similar infrastructure to provide optimal performance and uptime

Most AWS components are priced per hour. We’ll assume that you plan to host these sites long-term and multiply the hourly costs by 744 (approx. hours in a month) to get the monthly costs

AWS has a free tier where you get to use different services for free for 12 months if you keep the usage under certain limits. Since we plan to host production websites that will use much more resources than the free tier, we won’t consider it in our estimates. This will also ensure repeatable estimates for any additional websites you eventually host

Because of the wide range of products AWS offers, you can combine many services and integrate them with WordPress. To accurately calculate the hosting costs, let’s split the estimate into mandatory AWS components and optional services that can be skipped if necessary

## Mandatory AWS Services for WordPress
These are the services you absolutely need to properly host WordPress on AWS

**1. Server**
No matter what name you use, servers are the most important component of the setup. On AWS, virtual servers are called instances and are provided by the EC2 service. You can also use AWS Lightsail instances, but they are not a good choice for WordPress as explained in this article


If you are familiar with VPS and dedicated servers, you can use similar criteria to select EC2 instances. AWS provides hundreds of different types of instances that differ in CPU capacity and memory. You can allocate storage separately to these instances

For WordPress following instance types work well:
- General Purpose Instances
These instances provide a healthy balance of CPU and memory. For production sites M5 instances are ideal. You can reduce the cost a little bit by using T3 instances, but they come with CPU limits that are unwelcome when you are running important websites. To host 25-30 small WordPress sites or 1 large WooCommerce site, we recommend the M5.Xlarge instance. It comes with 4 CPU cores with 16 GB memory

- CPU Optimized Instances
These instances are ideal for CPU-intensive workloads, such as a WooCommerce store with a large number ofor products. If your site is database heavy, then these instances will provide quicker response times and fewer timeouts. If you are hosting multiple small WordPress sites, you might not notice much difference when using these instances. For large WooCommerce sites, we recommend the c5.Xlarge instance type. It comes with 4 CPU cores, but only 8 GB memory, instead of 16 GB that you get from the general-purpose instances. If you need more memory, you can opt for the c5.2Xlarge instance for a little extra cost

AWS also provides memory-optimized, and storage-optimized instances, but these don’t make much sense when hosting WordPress sites

**Server Cost** **m5.xlarge $0.192 * 744 = $142.64**
If you went with the compute-optimized instance, you’d pay $252.96 instead for the c5.2xlarge instance type

 2. Storage
AWS gives you the flexibility to allocate as much storage as you need for your instances. While this gives you the freedom to use as much disk space as you need, it also adds another line item to the AWS cost

On AWS, Storage is provided using the EBS service. For WordPress, the following types of EBS volumes work well:
- General Purpose SSD (gp2) Volumes
These volumes or disks are SSD-backed and provide a good mix of capacity and speed. Read-write speed (iops) depends on the size of the disk you create. Larger disks get more iops compared to smaller disks. For the sake of this article, we’ll go with a 200 GB volume, which should be sufficient for 25 small WordPress sites or a large WooCommerce site

- General Purpose SSD (gp3) Volumes

These volumes are similar to the gp2 volumes, but give you the flexibility of customizing the iops limit for a small fee. Unless you have a specific use case, keeping the iops to the default limit will provide optimal performance for your sites. These volumes cost a little less than gp2 when using the default iops limit and provide better speed for smaller volumes

There are other volume types available such as io1, io2, st1, etc. But these make little sense for WordPress and are primarily useful for io-heavy applications such as video editing or big data

**Storage Cost** **200 GB gp3 volume: $0.8 * 200 = $16**
**3. IP Address**
AWS assigns random IP addresses to the EC2 instances. These IPs are not fixed and you run the risk of getting a random IP address when the server is rebooted. Obviously, this is not ideal when hosting WordPress sites that need fixed IP addresses for the DNS. To resolve this, you need elastic IP addresses. For each EC2 instance, you can get 1 elastic IP for free. If you need more than 1 IP address, AWS charges $0.005 per IP per hour

Luckily, with modern server stacks, you can host multiple websites on the same IP address. For the purposes of this estimate, we’ll stick to the free IP address

**IP Address Cost: $0**
**4. Backups**
When running production websites, backups are absolutely essential. The quickest way to enable backups on AWS is automated EBS snapshots. With these, AWS essentially takes a point-in-time snapshot of your entire server. This snapshot can be used in event of data loss, disk failure or even accidentally deleting the entire server

EBS snapshots cost $0.05 per GB per month but only store the incremental changes on subsequent snapshots. So if your data doesn’t change much, you can expect to pay a lot less for daily snapshots than the retail price

Based on our experience, daily snapshots of a 200 GB volume that doesn’t change more than 5% each day cost between $25-35
**Backup Cost EBS Snapshots) $35**
**5. Data Transfer**
One of the biggest variable costs on AWS is data transfer. Any time someone visits your websites hosted on AWS, you incur data transfer costs. Some server providers call this the bandwidth cost. Every month you get up to 9 GB of data transfer for free. After that, you pay for each GB of outgoing data transfer from the server to the internet

Depending on the visitor’s region you’ll pay different transfer costs. For the purpose of this estimate, we’ll assume that most of the site visitors are from North America and you are using 200 GB of data transfer per month

**Data transfer cost 0.09 per GB * 200 = $18**
**Optional AWS Services for WordPress**

Now let’s look at the optional AWS services you can use with WordPress to improve performance, security, or availability

**Managed Database**
AWS provides managed MySQL databases that take care of updates, performance optimization, and backups for you. This is called the RDS service. RDS provides you with 1 or more MySQL database servers running in different availability zones to ensure higher availability. You can create multiple databases on 1 RDS instance and use them on different WordPress sites

Depending on your uptime requirements you can either stick to 1 MySQL instance or create a cluster of 2 or 3 instances running in different zones in the same region

Similar to EC2, RDS instances come with different cpu and memory limits. When selecting the DB instance type you need to make sure that it has more memory than the size of your database. If you select an instance smaller than the database then you run into a slow performance, which defeats the purpose of a dedicated database

Another thing to keep in mind is that if you host the database in a different availability zone than your EC2 instance, you will be billed for the data transfer between the server and the database. While it may not seem much, it can quickly add up on busy WooCommerce sites

For the purposes of this article, we’ll assume that the WooCommerce site has a 4 GB database, and go with the db.t4g.large instance type

**Database Cost**
Single DB instance (db.t4g.large): $0.258 * 744 = $191.95
High availability DB Cluster with 2 instances (db.t4g.large): $191.95 * 2 = $383.90
**S3 Object Storage**
While EBS volumes are great for server-side storage, sometimes you need to store a large number of files on the cloud. For example, WordPress media, images, PDFs, and site backups. This is where Amazon’s S3 service comes in handy. S3 provides near-infinite storage for individual files. You can use various backup plugins on WordPress to store site data on S3

To store WordPress media files on S3 you need a plugin like WP Offload Media. One advantage of using S3 instead of local storage for media files is that you never run out of disk space. S3 simply charges you for the used storage per month

There are different tiers of S3 storage, such as infrequent access, and intelligent tiering, but they don’t make much sense for media storage. You can consider them for long-term backup storage though

S3 also charges for file operations, such as put, copy, post, list, and delete. While these operations cost very little, ($0.005 per 1000 operations), these can add up if you have a large media library

For the purposes of this estimate, we’ll go with the S3 standard and assume a 500 GB storage utilization per month. Since the file operations will cost less than 1 cent, we won’t include them in the estimate

S3 Cost: $0.023 per GB * 500 = $11.5
**Cloudfront CDN**
Even though AWS has datacenters across the world, your server will still be limited to one of these locations. If you have customers in multiple countries or in different areas of the same country, using a CDN can provide better performance for your WordPress sites. On AWS, the CDN service is called Cloudfront. It’s similar to other CDN providers such as Cloudflare and Stackpath. Cloudfront can cache your website at 310 locations worldwide. When someone visits your CDN-enabled site, they receive a response from the nearby CDN location instead of traveling all the way to your server

Even if you don’t have customers distributed globally, using Cloudfront CDN can improve site performance and minimize data transfer costs at the same time

At the beginning of this article, we decided not to include AWS free tier savings in our estimate, but Cloudfront is an exception to this. Cloudfront comes with a generous free 1 TB data transfer per month. If your sites use less than 1 TB data transfer, then using Cloudfront is a no-brainer

For data transfer beyond 1 TB, you are billed per GB based on regions. This is similar to EC2 data transfer costs but slightly cheaper

Cloudfront Cost: $0 for 1 TB data transfer
**WAF**
WAF stands for web application firewall. These days, having an additional layer of security in front of WordPress is absolutely essential. As an experiment, we reviewed the visitor logs for multiple low-traffic WordPress sites. Within a few minutes of launching, these sites showed a large number of brute-force attempts and spam registrations

Since this is the new reality we live in, using a WAF for your sites can help keep them secure. Amazon’s web application firewall (WAF) gives you the ability to block malicious requests, prevent bots from attacking your sites and protect against generic threats

WAF is billed based on the number of rules you add to the firewall. If you enable bot protection, it adds a flat fee per month. Given that this is AWS, there is also a variable fee based on the number of visits to your site. All things considered, WAF is an essential investment for production websites


WAF Cost:
$5 per firewall + $10 for 10 rules + $10 for bot protection + $1 for 1 million visits = $26 per month
**Load Balancing**
One of the biggest allures of AWS is the high availability of servers. It’s a common misconception that hosting websites on AWS automatically makes them highly available. But the truth is that while AWS gives you all the components necessary for a high-availability setup, you still need to build it on your own. One of the critical components in this setup is the load balancer. A load balancer basically splits the website traffic across two or more servers. This gives you the ability to scale out and add more servers as the website grows. While this may not make much sense for the 25 WordPress sites we are hosting, a load balancer can be useful for scaling WooCommerce site across multiple servers

AWS provides different types of load balancers, including application and network load balancers

For WooCommerce, using application load balancer (ALB) is recommended. Keep in mind that when you use a load balancer, you essentially need 2 or more EC2 instances, a dedicated database, and a strategy to keep your files in sync across these instances

Application load balancer charges a fee for the balancer itself, plus a variable fee for the amount of traffic it handles

Load balancer Cost:
$0.0225 per hour for the load balancer * 744 = $16.74
$0.008 per hour for up to 25 new connections * 744 = $5.95
Total Cost: $22.69
Additional components required to run WordPress behind a load balancer:
2x EC2 instances, 1x RDS instance, 1x S3 bucket for media storage

**Route53 DNS**
One of the most important and often overlooked services is DNS (domain name system). This service is responsible for translating your website’s domain name to the server’s IP address. Often this task is left to the domain registrar’s DNS service, which is included for free with domain registration. While it can be sufficient to keep using the free service, sometimes you want a more robust and fast solution. This is where AWS Route53 comes in. Route53 provides you the ability to register domains, control DNS records, and perform advanced routing and failover at the DNS level


Route53 also comes with a 100% uptime guarantee, which is coveted by important websites. When you add a domain name to Route53, it gives you 4 different nameservers from 4 different root domains. This means that even if all of .com domains go offline, your DNS server will still be reachable from .net, .co.uk domains

Route53 charges a small fee per domain per month, and you guessed it, another variable fee based on the number of DNS requests

Route53 Cost:
$0.50 per domain + $0.40 per million queries = $0.90 or less per domain per month. If you are hosting 25 WordPress sites, you’d pay the following amount:
$0.50 * 25 + $0.40 (Million queries are shared across these 25 domains) = $6.65
**Other indirect expenses**
In this article, we looked at all of the AWS components necessary to properly run WordPress websites. Besides AWS costs, there are other expenses to keep in mind. Some of the inevitable costs include:
- AWS server maintenance:
Despite the fancy name, EC2 servers are still Linux servers that need maintenance and upkeep. Budgeting 1/2 hour per week on server maintenance can give you a more accurate estimate

- Security scans and malware cleanup:
Various security-related tasks including log review and SSL renewal are essential for production websites. Let’s add another ½ hour per week for this

- Staging and development sites:
Since AWS doesn’t provide a GUI to manage your sites, setting up staging and development sites is a manual process that can take an hour here and there easily. Let’s keep this to 2 hours per month for our estimate

- Learning Curve:
Even though most AWS services are well documented, you can expect a learning curve when getting started. While this differs from person to person, let’s go with 5 hours of learning for our estimate

Total time spent: 2 hours of server maintenance + 2 hours of security review + 2 hours of staging site setup per month = 6 hours per month
One time learning: 5 hours
All things considered, initially, you need to allocate 10-12 hours to get started with AWS and then keep the sites moving along smoothly. Multiply this with your hourly rate and you’ll get an idea of the indirect expenses associated with this project

**Total Cost**
Hosting 25 WordPress Sites or 1 WooCommerce on AWS with mandatory services: $211/month
Optional services for high availability, CDN, Security: $191 to $450 per month
**Cost-effective alternative to self-hosting**

If all these moving parts seem daunting to you, or if the cost is a little too much, there is a better way. At Nestify, we have perfected WordPress hosting on AWS at scale and have built an intuitive dashboard for site management. Because of the economies of scale, we provide you with a fully managed WordPress hosting service at a significantly lower cost and none of the learning curve. With Nestify, your total cost for hosting 25 WordPress sites or a large WooCommerce site on AWS would be $99 per month, with no variable costs or hidden fees. If you need a more customized solution or have complex hosting needs, get in touch with us and we’ll build the perfect solution for you.