How to Install WordPress at Amazon Web Services (AWS) Cloud

How to Install WordPress in the Cloud

How to Run WordPress in Amazon’s Cloud

In a day and age where people routinely post their thoughts on Facebook, an unlinkable, unsearchable, corporate-controlled walled-“garden”, I’m a big fan of owning your own blog. Not only does it give you full creative control, but it’s free of censorship, gives you full ownership, is optimized for search engines and is fully linkable and shareable.

While WordPress.com may be suitable for most people, I prefer the flexibility of running my own server. One of the more affordable solutions is Amazon’s cloud-based Web Services (AWS). But, getting started with AWS can be overwhelming without a deep technical background. When I first installed WordPress on an AWS micro instance, it kept running out of memory and crashing. Then, when I installed a custom, responsive theme on a larger instance, it was still quite slow.

This guide will provide you a detailed, step by step approach to setting up your WordPress blog at AWS in a high performance, economical fashion using an AWS Micro (or Small) instance running on Apache with Varnish and the W3 Total Cache plugin to optimize performance.

15 Comments

Jeff, this is a great (and as you say, extremely detailed) guide to setting up a WordPress blog at AWS. Nice work!

For what it’s worth, though, I used to have my WordPress blog on a Rackspace Cloud VPS (very similar to a small Amazon instance), at a cost of about $12/month and I found it was suffering from terrible performance, even with minimal traffic. I’m not nearly as good at config/optimizing as you are, but I eventually threw up my hands and moved it over to Webfaction (http://webfaction.com) where I’m paying $5.50/mo for 256MB on a setup that’s somewhere in between a VPS and a generic crap webhosting account.

I can install anything I want, including Python + Ruby on Rails stuff, MySQL + the OS don’t count against the RAM limit (!), and they’ve got WordPress and lots more (not just PHP stuff!) packaged up as one-click installers. It was all lightning fast, and I had to do zero system-level performance tweaking. For someone semi-technical like me, I found this really hit the sweet spot between control and managed hand-holding for a small site. $0.02.

I have a basic question related to the domain names. I already have a site up and running but I want to build some new pages in wordpress on a test site (in the cloud) before I push them live on to the existing domain name. What I am trying to do is to install a wordpress template on the cloud so I can mess around with it. On rereading your page I was wondering whether this was actually possible and whether what I ought to do is set up the test site on a different host before transferring it to the cloud. This is not my preference but it isnt clear how to use the cloud with wordpress for R&D purposes. Thanks.
Tom

Tom, WordPress makes it pretty difficult to sandbox sites and move content around – it’s a definite weakness in the platform.
I would try a free blog on WordPress.com or Pagely (http://page.ly/?a=3520274193) / test your theme there before trying this AWS tutorial.

@jeffreifman:disqus, let’s say I go through this whole guide, set up wordpress multisite and start selling a platform for churches to get on board with wordpress. Now, one of the additional features I’d like to offer is email. As of now, I’ve got WHM on GoDaddy which provides a cPanel where I can simply add emails. But how would I tackle the email ‘issue’ if I go the route you’re talking about?

I know that I want to use a cheaper and (MUCH) faster & efficient hosting for these folks. And as I’m looking for “GoDaddy Alternatives”, this sounds …PERFECT – except for the email side of things. How would you recommend I do this?

Wait… you’re available for “consulting”? Something tells me I’d much rather have this ‘D-O-N-E’ than try to tackle it myself.

Hi @Jeff Reifman. Thanks for this amazing guide. The integration of W3 Total Cache with AWS and Varnish is genius. Do you think this method would be suitable for running multiple (low-traffic) wordpress sites on the same server? I would consider running a medium instance to do this (I’ve heard it has much higher network I/O), do you think thats overkill, or would it be trivial to upgrade from small-to-medium later? My only other concern would be the ability to route different domains/ips to the same machine from elastic IP.