Search code examples
wordpressamazon-web-servicesamazon-s3amazon-ec2amazon-cloudfront

How to speed up my wordpress site(EC2, CloudFront, S3)?


I currently have a site which has 200k monthly views, and growing. The users base is all around the globe, English speaking users. The site is made by WordPress running on shared hosting account.

Users saying the site is slow.

I need help with speeding up my site performance. My Initial thought is that I need to setup a CDN, I have read many about amazon cloud front, s3, and ec2.

1) First , is moving in Website from GoDaddy Shared Hosting to Amazon EC2, will give me better preforamce? I don’t use Application the only thing I need is Fast Wordpress Hosting, I wonder how much faster EC2 machine will be against godaddy shared hosting, which package will be fast enough for a site with 300k monthly views? 2) AS I understand, Amazon cloud front(CDN), will serve static data to the nearest edge location near/by the user. I am only talking about images here. Does it mean that the actually CDN will replicate those picture across edge servers? Means CDN is a service that also store the actual files? Or it is just the service or will translate the url to nearest server?

3) IF CDN is only a service who gives you the link to the closet server that yours files are stored at, Then I will need S3?(Or other server to store my files, like my EC2?), As I understand S3 it’s a storage service, which is fast. When I tried to create a bucket, I Could see that I can create it under specific region/server. So how it works with CDN?

If I have the same DATA (images) that I want to spread across regions.

Does it mean that I will have to buy a few buckets of s3 and create them on different regions? upload the same images to a different bucket that is located on different region ? How do tell /pass CDN (Cloudfront) the information about this buckets, that the closet bucket will be served ??

Is there a replication mechanizing at S3 that replicates the images between regions and will save me the manual upload of this images?

What is edge server in CDN? The server which stores the file? So if its S3, does it means that EC2 Instance who runs webserver can function as edge server?

So to speed up my site: 1) Stay on godaddy, buy amazon CDN, buy few S3 Buckets on different regions(except the godaddy region) and upload all the files ? 2) Stay on godaddy, buy amazon CDN, buy few S3 Buckets on different regions and upload all the files 3) Setup the new website on amazon ec2, buy cdn, buy few s3 buckets. Are this options correct?


Solution

  • Regarding question #1, I think dedicated hosting is generally going to be faster than shared hosting, but there are just way too many variables here to say that with 100% confidence. In general I would not recommend AWS for something like this if you don't have a year to study and learn all about AWS and cloud computing. I would probably recommend an easier-to-use service like Bluehost or Digital Ocean that caters more to hosting things like Wordpress.

    Regarding questions #2 and #3, a CDN is a collection of edge servers that store (cache) the actual files at each CDN edge server. The edge servers are provided by the CDN service. So you don't need to do any of that stuff you are talking about in question #3 with multiple S3 buckets in multiple locations. You just need a single origin (server or S3 bucket) where the CDN can pull the latest files from.

    Also I would look into other CDNs than just Amazon CloudFront. For a Wordpress site that you don't want to spend tons of money on, I would generally recommend using CloudFlare instead.