Is Self-Hosting WordPress In The AWS Cloud Just Pie In The Sky?

Hosting in the cloud sounds so alluring: no physical constraints, real-time scaling for those traffic spikes, built-in redundancy, only paying for what you use.

Amazon’s Web Services is the granddaddy of cloud-computing and with the number of tutorials out there for setting up a site you might think that it was an obvious option for those WordPress owners fed up with shared hosting.

But is AWS really a viable option for WordPress owners who have only ever known CPanel?

A photo of a hand holding a paper cut-out cloud
To become king or queen of the cloud needs expertise and scale

I suspect that most WordPress owners see hosting as a necessary evil, which is presumably why WordPress.com with its “forget the hosting” proposition is so popular. We just want our hosting to work, we want our sites to be responsive and be available most of the time.

Cloud hosting is often touted as a solution to hosting woes, especially those woes experienced by shared hosting clients. Amazon’s Web Services (AWS) provides a multitude of cloud-based services but the ones we’ll touch on here are:

  • CloudFormation – a quick and easy way to create an instance (server) from a template
  • EC2 – this is where the instances are managed

I put my extremely limited (closer to non-existent) sys admin skills to the test and took AWS, specifically their CloudFormation service, for a spin. I wanted to find out just how feasible it is for the average WordPress site owner to move a site to the cloud.

Easy To Set Up

Screenshot of part 1 of the 4 part instance creation wizard
Creating a WordPress instance with CloudFormation is just too easy

With CloudFormation, setting up a *Nix instance on EC2 with WordPress installed is ridiculously easy. All I needed to do was either select WordPress from the template drop down or provide the url of one of the example templates.

After filling in a few extra details (I changed passwords so I knew what they were), away it went and in less than 10 minutes my brand new EC2 instance running WordPress was ready.

I set up a single WordPress install running with a local database but it’s just as easy to split the database out to run in Amazon’s RDS environment providing a pretty robust solution.

And, it doesn’t take much to edit the template and add the WP_ALLOW_MULTISITE to make the site multisite capable. Combine this with AWS’s Route 53 DNS service and set up a wildcard DNS and you’re well on your way to setting up a rival WordPress.com.

Not So Easy To Manage

It’s once I really started delving into the set-up that I started to run into problems. Not of AWS’s making but because of my own shortcomings.

Whilst installing plugins and themes and uploading to the media library were all fine, permalinks weren’t working and I had the 2MB limit on the media upload which I wanted to change.

But how?

I eventually managed to set up FileZilla to access the instance (getting a quick introduction to key pairs on the way). However, after I found my way to WordPress directory I discovered that any attempt to edit a file (such as wp-config.php) was met with a permission denied error, even though Better Security WP told me that the .htaccess file and wp-config.php were both writeable. Every attempt to upload a file resulted in a failed transfer.

So, reluctantly letting go of my GUI security blankets I fired up SSH, with some vague idea of changing file permissions, logged in (thanks to the directions in EC2 connect modal dialogue) and was immediately met with:

Screenshot of an SSH screen
In the Cloud, no-one can you scream “how many updates?”

Whoa! And this is when it hit home that I was totally on my own. Everything from the *Nix system upwards was now my responsibility. And all I had to help me was a command line with a cursor that mocked my ignorance with every blink.

Longing For CPanel

CPanel login box
The self-hoster’s biggest security blanket

Sure, I could have persevered and kept hoping that Google came up with the answers I was looking for but my goal here wasn’t to become a server expert. In fact, it was the opposite: could I host on AWS without needing to be a sys admin?

Looking at that command line, I found myself longing for CPanel. I wanted a GUI interface to give me easy access to all the seemingly simple functions such as accessing the file system. I wanted that abstraction, I wanted those icons. I certainly didn’t want to have to type commands even if I could remember what they were.

Actually, what I didn’t want was what the command line represented. I didn’t want to be responsible for the server. I felt hopelessly out-of-my-depth. I wanted someone else looking after the server software, updating, tweaking, deciding which of 243 total update(s) were necessary.

Need To Have Server Experience

And, this is the crux. Whilst AWS is no doubt incredibly flexible and the ability to create and destroy instances at will fantastic for creating temporary sites, you need to know what you are doing at that server level. You need to understand *Nix, you need to understand networking and you need to understand web servers.

In short, you need those sys admin skills that CPanel on a hosted account won’t have given you.

The Cloud Is For Big Boys And Girls

WordPress logo with text
The cloud is still the domain of the big players

Even if you’ve got the skills, there’s still the matter of cost. For a WordPress install running on a ‘small’ linux instance (160GB local storage, 1.7GB ram, low IO) with a local database and 50GB of traffic per month, the cost is just over $50 which is fairly expensive in comparison with even managed WordPress hosting. Up that to a ‘medium’ linux instance (410GB local storage, 3.7GB, 2 ECUs, moderate IO) and you’re upwards of $100 per month.

Now, if you have a popular site these sorts of figures are not going to scare you off and, in fact, the bigger a site gets then the more cost effective it becomes. There are also substantial savings to be made in prepaying for one or three years.

What About The Average WordPress Site Owner?

I don’t think that AWS is going to be viable for the majority of WordPress site owners. Self-hosting on AWS requires a level of knowledge considerably above and beyond that required to manage a hosting account via CPanel and you’ve either got to already have that knowledge or be inclined to pick it up on what seems to be a fairly steep learning curve.

It’s also a question of cost and you’ve got to work that AWS calculator with some realistic figures to see if the economics work.

If you are used to running your sites via CPanel then you are in for a rude shock when it comes to EC2. Whilst the web interface to create the instances is fine and relatively easy to follow, once set up then you are on your own and left with SSH. If you’ve never done this before then it’s all very daunting and you are looking at a learning curve that very much resembles a ‘J’.

There is no pathway from shared hosting to AWS for anyone but the most technical of WordPress owners. For the rest of us, if our current shared hosting arrangement is not delivering then we’d be better off looking at alternatives such as managed WordPress hosting or moving to virtual private server.

And keeping that CPanel security blanket.

Are you hosting a site using AWS or something similar? What has your experience been? How much of a sys admin have you become?

Photo Credit: Karen Ka Ying Wong

28 Responses

  • New Recruit

    Thanks Chris – having tried this myself a couple of weeks ago, I’d agree. I have enough *Nix experience to get by, but not enough to review the security of the templated platform effectively. Decided it would be better to contract hosting companies to assume that risk.

    Also, whilst AWS’ ‘free tier’ computing looks attractive, its boundaries and the calculations of cost when you step outside that are not so clear. It takes a fair bit of data to predict resource usage trends with much accuracy – so again, not for beginners. Still, when I plugged in some numbers I felt confident with, the savings weren’t nearly enough to justify the extra effort/risk, and in some cases worked out *more* costly than some other options.

    So yeah, I still think AWS must be great for some – but its whole pitch seems to assume that only large IT departments use the internet. So, maybe not meant for us smaller agencies, then…

    • Yes, the security side had me really concerned. It’s often onerous enough to keep WP, plugins and themes up to date without having to also worry about patches to the OS, MySQL etc.

      Time consuming too.

      And not really being able to pin down the cost is a real issue, isn’t it? The upside to having a site that can handle being “slashdotted” (do the kids still use this phrase?) is that there’s massive bill shock at the end of month!

  • New Recruit

    Hi again –
    I must say are covering some amazing content recently. Love reading your articles.
    After using Amazon’s AWS for quite a while now, I did look into Cloud server for one of my sites, but I did not get very far, so I was quite intrigued when I saw your email regarding your efforts.
    Can I ask you something though –
    Is it possible to say host a sales page as an HTML page ( that currently resides on my wordpress site – it;s a membership site) and still have the rest of the site on my own hosting?
    The way I see it – sometimes a lot of traffic hits my sales pages and tends to slow down my site – but of course everyone that comes to the site does not buy, so if that scenario is possible then once someone becomes a member – we can then take them to the main wp site.

    Interesting scenario, but not sure how to implement it.
    Thanks for the great article.

    • Thanks for compliments!

      For a static HTML file then certainly S3 / CloudFlare (thanks @PeterWrigth) is an option. There are entire sites that are served from S3.

      You might also want to take a look at some of the caching plugins, such as WP Total Cache. These create static versions of your site’s files and often offer the option to store / serve using a CDN such as S3.

  • New Recruit

    I agree with all the posts above, in general.

    I am in the process of moving from shared hosting (Cpanel) into AWS.

    Here is my experience:

    – You do need some understanding of Unix (Had some back in University over 20 years ago, on Solaris, surfing on Netscape …Good Old Days).
    – Free Tier needs to be watched, for not stepping outside.

    Here few tips to make the move easier:

    – I sign-up to AWS Free Tier and signup for some useful free training. AWS Technical & Non-Technical Certification to get an overview. You could signup for the Partner Program that will give you extra support.

    – I used Bitnamin to deploy a WordPress Multisite in the Cloud. (First server Free). You can easily manage your server / apps / backup / monitoring, etc … Ease for the Sys Admin job,

    If you really miss Cpanel, set-up Webmin on your server, and it will ease the Sys Admin Job.

    I moved a multisite from a shared environment at $14.95 per month with 256 Mo Ram, very slow …

    into a free EC2 instance (AWS) & free server management (Bitnami) and free Panel (webmin).

    I got more Ram, more optimization and will be ready for the hits on my sites. Got $500 from AWS, if I spend $2,000 with them this year…

    Back in April, I was completely new to WordPress and the best investment was signing up for a year as member of WPMU!!!

    You do need to spend some time to crack it, but it is worthwhile if your site will move up the gear.

          • New Recruit

            Chris, cPanel pretty much auto-updates itself nightly, the others you should go in and update everything once in awhile. Also check into adding the free ConfigServer Firewall and mod_security.

            The WHM/cPanel setup I have is the easiest to deal with and seems to consume the least resources. $14.95 a month to license it for a vps.

            Something else, all my sites send mail fine but as far as downloading incoming mail via Outlook or Thunderbird only the cPanel emails seem to work correctly out of the box. So for the sites I have running on other control panels I route the mail through zoho.com and use their mail. Seemed like the easiest option.

      • New Recruit

        Hi Chris,

        Following my last post, I would like to reflect my experience and share my experience with AWS.

        1/ I gave up on Bitnami, as I wanted to have a more powerful Panel to manage sites that Webmin. Zpanel is a free very powerful tool, similar to cPanel. The problem, I needed a fresh install of server to set-up Zpanel, so I couldn t do it on the server set-up Bitnami stack, so I gave Bitnami Cloud (monitoring) in order to get a good GUI Panel (Zpanel)… shame.

        Maybe, Bitnami & ZPanel talk to each others …

        2/ Set-up a basic install of Ubuntu 64x LTS, so I manage to set-up ZPanel – Great to have an equivalent of CPanel for free …

        3/ Ubuntu is doing miracle, I install JuJu (Services Orchestration), then install JuJu Gui (Brillant Gui for all services / server admin) and the beautiful Charms (WordPress, Mysql, Nagios for monitoring). It all very simple, just need good attention to details, just follow instructions properly. Use t1.micro instance.

        In summary:

        – Free Tier AWS Infrastructure;
        – Free ZPanel;
        – Free Server OS (Ubuntu) & Services / Monitoring (Juju)

        You can monitor, scale up & down from graphical GUI and normal Panel (no classic Sys Admin, when it is all set-up properly).

        I will be finishing up everything and tied up (document, etc …) over the next few days. I will create an Amazon AWS AMI image and make it available for people … You will just need to launch an instance from that image and some configuration and you will be set-up.

        If you are interesting, drop me a line: [email protected]

      • CTO

        I recently moved my sites to DigitalOcean from rackspace cloud. It is like 2x faster, and I got twice the RAM for 1/3rd the cost (even less compared to Amazon). Their SSDs make MySQL blazing fast, been super impressed with them.

        If you are willing to do a little sysadmin legwork it will save tons. I think AWS is only really valuable for much larger projects that will need dynamic scaling. Their hardware is old, slow, and expensive.

  • WPMU DEV Initiate

    This isn’t so much an AWS vs shared hosting, it’s basically shared hosting vs everybody else as you will run into basically all the same ‘issues’ with most every VPS out there (there are a few managed VPS providers), and an AWS EC2 instance is essentially just a VPS, it’s just that Amazon offers a number of other services that can work with that server. Also one thing everybody should keep in mind, AWS is a full on big time enterprise infrastructure solution, it’s relatively complex, and the pricing may seem whacky, but it’s setup that way to provide a huge amount of flexibility when you are dealing with multiple servers, multiple storage needs, multiple DB needs, etc. There are plenty of options that fall in between your typical shared hosting setup and AWS.

    Either way, if you want to crack into that next level of performance you need to get away from traditional shared hosting, and these days it doesn’t have to cost a lot of money. But you do need to have (or have access to) some level of technical skills at a *nux command line.

    But the results can be well worth it, my overly neglected personal blog loads a full page of blog posts (with plenty of pictures) in under a second in most of the US with the fastest being about 300ms (I’m more at the mercy of network latency and such at this point), and according to a few BlitzIO tests I can theoretically stack about 1M people a day on the site, so in the real world lets say just 10% of that at which point monetizing the site wouldn’t be that hard (and I could move up to more powerful hosting), not that it will ever see anywhere close to that traffic level, but being a tech weenie it’s fun to see what it can do. The site is running nginx, APC, ngx_pagespeed (from Google), PHP and MySQL.

    And all of that running on a $5 Digital Ocean droplet. That’s the kind of performance you can pull out of WordPress site when you have full control over everything.

    • New Recruit

      Well put, Ajay213 – yep, I wasn’t bothered that AWS wasn’t ideal for me, only that the pitch didn’t clarify the target market. With *such* a high-profile brand, it’d be helpful if the language was plain enough that smaller concerns *didn’t* have to experiment for hours to confirm that it’s not going to help them. Which is why Chris’ article is so welcome, of course.

      As you say, there are plenty of options between shared hosting and AWS, though VPS systems often include Plesk/cPanel or similar, so *nix/CLI skills aren’t always vital. Whilst falling short of a full ‘managed VPS’ setup, these then often provide support with low-level security. With AWS, I baulked at the choice of either trusting an EC2 instance as-is or checking it all through by CLI on my own.

  • New Recruit

    I’n all honestly the first stumbling block is using that “SIMPLE” monthly calculator!

    This is probably the next step for me and how i’d eventually want to host my website. The problem is the simple user unfriendliness of the whole thing. It puts off potential clients like myself who would like to use this solution but are simply put off by another learning curve to use this product.

    How difficult would this be to wrap around a simple user interface around the whole thing to get more people on board?

    • New Recruit

      Good question, Rakesh – actually, the packaged installs simplify things a great deal if you’re happy to trust them as-is, or feel confident reviewing their security yourself. I wasn’t, but I suspect the packages are actually very well configured.

      However, AWS is complex because it’s flexible. Making something complex look simple is difficult; doing so without losing the flexibility is even harder. So, including smaller-scale operations may just be too resource-intensive to be worthwhile.

      So, AWS targets larger enterprises, some of whom then create simpler interfaces for resale to smaller firms. AWS is selling at the data-centre level though, so those resellers will then look almost exactly like normal hosting companies. Essentially, unless you’d be comfortable with provisioning and securing a server bought direct off a data-centre, AWS’ advantages largely evaporate – it makes more sense to pay a middle-man hosting company to sort that out.

  • New Recruit

    Hi Chris,

    For self-hosting WordPress on cloud servers, you might want to check out ServerPilot, my company’s control panel.

    https://serverpilot.io/

    We built ServerPilot specifically for developers and site owners using cloud servers and VPSes. That is, we’re not a control panel that hosts would use to sell shared hosting, we’re a control panel that automates all of the configuration and server management of EC2 and other servers so that site owners can easily move beyond shared hosting.

    I spent the last ten years managing cPanel and Plesk servers for developers. About two years ago I started working on a new approach to server management and control panels, putting together a team, and raising seed money. A few months ago we launched and the response has been amazing so far.

    We still plan to make the initial provisioning of EC2 servers easier as AWS is a fairly complicated beast for many developers (for that complexity reason, many people are using other cloud server providers like Rackspace and DigitalOcean). For now, we have a tutorial on how to connect a new EC2 server to ServerPilot:

    https://serverpilot.io/community/articles/managing-ec2-servers.html

    And here are some instructions for connecting a new server and then installing WordPress:

    https://serverpilot.io/community/articles/install-wordpress-on-ubuntu.html

    I’d be happy to chat more by email or on the phone.

    Thanks,
    Justin

  • New Recruit

    Good post and evaluation of AWS. However, I get the impression that you install WordPress and the start developing it when it’s public?
    That’s not a good practice really, you should do all your developing locally and then publish it to your production enviroment (ie. AWS).

    I develop my sites off my local Vagrant server, and then hit publish in my GIT to send all files to my production server where visitors can see my site. Be it WordPress, Joomla, SiteVision or whatever application you are using, always develop on a local server or a shared server not available to the public.

    AWS has some good points, but it really depends on your situation and amount of traffic to your site. You can equally use a shared web host and combined with, let’s say CloudFront or similar to get the same speed and uptime really.

    But for corporate global websites with heavy traffic and lot’s of content AWS is really doing well. But there are plenty of clouds to choose from nowadays.

  • New Recruit

    Hi Chris,

    Really useful, in-depth article. Complexity aside, would greatly appreciate your help with another question: cost-effectiveness of AWS vs Google Cloud Platform vs managed hosting (such as Pagely, WPengine etc).

    In your post, you mention AWS ended up costing you $50 a month, while some have said in the comments that they’re managing fine within the limits of the free tier. I am launching a WordPress site that makes extensive use of plugins (like wpgeodirectory.com) to convert it into a business directory site with user-submitted reviews. I expect traffic to grow linearly from zero to 10,000 visitors per day, over a period of 6 months. Almost all traffic will come from India.

    How can I realistically calculate what resources I’ll need on AWS / GCP, and therefore what the costs will be? Their so-called “simple” calculators are beyond me!

Comments are closed.