AWS EC2, RDS, S3/CloudFront, Nginx + WordPress Tutorial Roundup

amazon-web-services-nginx-wordpress

Amazon Web Services is an ideal provider for those looking to set up a server environment that takes WordPress to the next level. A fast website should be a top priority for anyone who cares about their website’s user experience and search engine rankings.

Enter AWS and Nginx

Nginx is a lightweight, high-performance, open source HTTP server that is ideal for WordPress. It is different than the traditional Apache setup, so it may take some getting used to for those who are more familiar with a LAMP environment.

Setting up a server on AWS means you have full control of the environment. This may not be ideal for everyone. You should first determine if you have the knowledge currently to be of master of your environment before you invest the time and dollars. Keep in mind, Amazon’s support is nearly non-existent unless you are a bigger budget site or application. There are a lot of great hosting alternatives to AWS like WPengine and Page.ly that have equivalent speeds. Ok, enough with the disclaimer…

Ready to Get Started?

There are many tutorials on the Internet to help you set up a fast WordPress environment on AWS. The quality of these tutorials range from good, bad to very bad. I’ve done my best to provide you a list of quality AWS Nginx tutorials. If you’re new to server setups, Nginx and AWS then the following tutorials and accompanying commentary will provide your with a number of quality setup guides.


LEMPress

Description: A super easy to use server setup script for creating a WordPress optimized server.

LEMPress

Opinion: LEMPress is an extremely easy way to setup a pretty solid WordPress environment. The utility walks you through the setup instructions and automates A TON of the process that goes into many of the tutorials on this post.

With LEMPress I was able to get a site up on an EC2 Micro instance in a fraction of the time as any of the others. The server configs are tuned pretty well (as far as I can tell), but there’s definitely room for improvement. Caching is not setup or automated so you will have to setup W3TC or another caching plugin. As well, there doesn’t appear much development activity in the GitHub repo. This is a real shame because it’s a very powerful script that shaves so much time. If you are struggling with a server setup tutorial, give LEMPress a shot.


Installing WordPress on EC2

Description: One Tiny But Bitchin’ Server (w/ Nginx + WordPress + Lots of Goodies)

art-of-code-aws

Opinion: This article was suggested to me by Jens Ahrengot Boddum after I posted this article in our Advanced WordPress Group on Facebook. It’s part 3 of a 3-series tutorial and is very well written and concise. Although I didn’t follow along to this tutorial, it looks like one of the best out there. Give it a shot and leave a comment if you think it’s great, good or bad.


10 Million hits a day with WordPress using a $15 server

Description: The following tutorial provides steps to build a Linux server using Varnish, Nginx, W3 Total Cache, and WordPress, to build a WordPress blog on a Amazon Micro server (or equivalent), all costing under $15 a month, capable of sustaining 10 million hits per day, as measured by blitz.io.

10-million-hits-a-day

Opinion: I followed this tutorial from and was able to get a fast server up and running in a couple hours. I did come across a number of snags, particularly when setting up multiple domains on the server. I wanted to be able to host more than one domain on the particular instance. I eventually figured it out but it wasn’t covered in the article.

The author of this tutorial has also recently redacted certain parts of the article covering W3 Total Cache setup. He states in his update that he has lost confidence in W3TC and it may have security issues. I believe he posted this prior to the latest release of W3TC in which a lot of issues have been addressed. I do agree though that there still may be some lingering issues with W3TC.


Optimizing WordPress with Nginx, Varnish, APC, W3 Total Cache, and Amazon S3 (With Benchmarks)

Description: Run a server using Varnish as a front-end to Nginx which is running WordPress loaded with W3 Total Cache configured to use Amazon S3 as its CDN.

wp-varnish-aws-w3tc

Opinion: The setup in this tutorial sounds great! I was inspired to give it a go but after reading it over several times I found it hard to follow, for me at least. The end results as described by the author sounds very promising. You may find it much easier to follow along and could end up with a great server setup. I decided not to take a stab at this one.

Doesn’t this environment setup look simple, effective and FAST?

WordPress Webserver Configuration


High-Performance WordPress with W3 Total Cache and Nginx

Description: Instructions for setting up W3 Total Cache and configuring Nginx once you have your AWS environment setup.

wp-varnish-aws-w3tc

Opinion: This article is a bit light on the instructions and details but does provide a good overview of W3TC and Nginx. I reviewed the Nginx config file that’s on Gist for awhile to see if I could get anymore juice out of my setup. Other than that, there’s not much here in terms of ‘guiding’ you through the setup process.


WordPress on Amazon Web Services from Start to Finish

Description: A WordCamp Las Vegas presentation by my friend Michael Bastos in which he explains everything from AWS sign-up to Nginx and WordPress setup.

WordPress on AWS from Start to Finish

Opinion: I can tell Michael spent a lot of time on this presentation. Slides 1-20 are relatively easy to follow along and there’s a lot of detail on how to set up your server and SSH into it. Where I started to get lost was when you begin installing Nginx, PHP and a bunch of other goodies. There are slides full of commands that you seemingly copy-and-paste into your SSH window. If you’re more familiar with command line and want a straight to-the-point presentation on how to quickly set up a WP site on Nginx then this may be the slideshow for you.


How to Install WordPress with nginx on Ubuntu 12.04

Description: Run a server using Varnish as a front-end to Nginx which is running WordPress loaded with W3 Total Cache configured to use Amazon S3 as its CDN.

how-to-install-nginx-ubuntu-wp-digital-ocean

Opinion: This article provides a lot of relevant information despite not being AWS-specific. I have having issues setting up my Nginx Server Blocks and about mid-way down the page there’s relevant information on how to set up the WordPress Virtual Host


Amazon Web Services, Nginx, WordPress, W3 Total Cache and microcache case study

Description: Recipe – For this dish, you will need: 100g EC2 Micro Instance, 100g RDS MySQL server, 100g S3 bucket, 1 Nginx, freshly picked from yum, 1 WordPress (from a tin is fine), A sprinkling of W3 Total Cache, and a dash of microcache

knownzeros-aws-nginx-tutoral

Opinion: This article is light on the details, although he does a decent job explaining the high-level setup process for his environment. This is more of a ‘case study’ than actual tutorial, but he provides some good instructions on AWS. The bit at the end about Nginx microcache piqued my interest as well. No comments?! It must be because it’s a relatively new article.


Additional Resources

The following are WordPress, Nginx and AWS related articles, tips and tricks that helped me build the environment that the site you’re on is residing.

  • Nginx Redirect non-WWW to WWW and www to non-WWW – Working advice for redirecting your domain with or without the WWW. Great if you are used to .htaccess and are having trouble with Nginx’s logic.
  • The Ultimate Guide to Setting Up a WordPress VPS – By WP Mayor – A several series article on setting up WordPress in a VPS. A lot of application to AWS, albeit some minor variations.
  • WordPress Codex – Nginx – Nicely written article aimed to help those looking to configure WordPress with Nginx on the WordPress Codex. Despite being marked as incomplete, it’s pretty well written but I found it a bit difficult to follow some parts.
  • Nginx WordPress Wiki – Config files from Nginx themselves for WordPress. This is probably best for those more familiar with Nginx setup and documentation.
  • Nginx Helper Plugin – Helps WordPress-Nginx work together nicely using fastcgi/proxy cache purging, nginx map{}, rewrite support for permalinks & more

Summary

AWS and Nginx can be confusing. Throw in Varnish, W3TC, ubuntu, PHP and a slew of other technologies and you can quickly become overwhelmed. I’ve been very frustrated at times during my setup process. It’s about finding the ideal system setup that works for your website. Websites themselves are unique. They differ in traffic, technology, design and functionality.

I hope this article resource guide helped you create an environment that’s fast, reliable and secure. Have an article or tutorial you think should be on this list? Please leave a comment below and we’ll update this article with quality resources.