Hosting WordPress on AWS vs. WordPress.com

Last week I posted a tutorial on how you can run WordPress on AWS. In this post, I will explore a bit whether it is actually worth going down that path or whether it is better to just use WordPress.com

This is not going to be highly scientific and likely colored by my opinion. You will have to decide for yourself which option is better for you, but maybe some of my thoughts will help you make a decision. Also, I’m not sponsored by either Amazon or WordPress.com.

For those who don’t want to read the full article here is the summary:

As so often in life the answer is: It depends. You can get more flexibility for cheaper out of AWS. On WordPress.com, you have less headache operating your own server, but less flexibility unless you pay for the more expensive plans. I’d say that for 90+% of people the WordPress.com option is the better option. The only exception is if you need a lot of storage and/or plugins. In that case, you might be better off with AWS.

Now in more detail. Let’s first go over a couple of advantages to host your blog on AWS:

  • It is relatively cheap. For 5$ a month you get 20GB storage and 1TB data transfer (that is plenty for a small blog)
    • you still pay extra for a domain and you don’t get a free one. For a common one that is maybe 10$ a year.
  • full flexibility: no ads, you can install all plugins you want
  • you can host your blog in the geographical region you prefer
  • if you have other stuff running on AWS you can easily integrate with that.

Some disadvantages of hosting on AWS

  • you are responsible for updating everything to keep things modern AND secure
    • the OS and all applications that are running on your Linux instance
    • need to maintain the SSL certificate (can be done automatically)
    • update WordPress regularly and all installed plugins
  • As you scale you will pay more.

Now, let’s take a look at the plans that are offered by WordPress.com. The first advantage, of course, is that you can get started for absolutely free. As of today, this blog is running on the free version and I merely set up a forward from stefansiebel.de to stefansiebel.wordpress.com. Not nice, but works great. In this mode, I would be able to scale to as many readers as I can get. That is already one clear advantage compared to hosting your blog yourself on AWS.

plans

The basic plan is available to you for 4€ and gives you three main advantages. You get a custom domain, no more ads are displayed and you double your storage for images from 3GB to 6GB. To be honest for 4€ a month that wouldn’t be enough value for me to consider (except maybe if I’m running out of storage).

The Premium plan essentially allows you to monetize your site and supports video. Again, additional storage is offered. You’ll probably need it if you want to store videos. The thing is that I don’t quite see why I would upload videos to WordPress. Youtube or Vimeo are the better platforms for that and you can embed video into posts even in the free version of WordPress.com.

Finally, the Business plan gives you the full flexibility. Only the business plan lets you install plugins. It comes with a very high price tag of 25€ a month. It gives you a ton of other advantages as well including unlimited storage and personal support. In my opinion that is only worth it if you are actually running a business and in that case the price is probably not too high. As I wrote already in the summary at the beginning of the article you are likely better off using AWS if the only thing you need is more storage and the ability to install plugins. You should have a minimum of technical expertise though if you are going for that option.

I hope this was helpful. There are plenty of other options available as well that you might want to consider. How are you hosting your WordPress Blog?

 

Hosting WordPress on AWS

There are a ton of options out there to host WordPress including simply running it for free on wordpress.com. That’s the option that I chose for the moment to host this blog.

One option that I’m simply interested in is hosting a WordPress instance on AWS. AWS offers amazing capabilities, but also requires a fair amount of knowledge. So how hard is it to get a WordPress instance up and running?

Not hard at all, as it turns out. Let’s take a quick look into it.

Setting up WordPress using AWS Lightsail

selectlightsail

I’m going to assume you already set up your own AWS account and logged into the AWS Management Console. Click on Services and select Lightsail under the Compute category.

On the Lightsail homepage, select to create an instance.

createinstance

You may pick the region in which you want to run your instance. I picked Frankfurt as I live close to Frankfurt. Then select a platform (Linux) and an application, in our case WordPress! Further down on the same page you can pick a custom name for your instance but if you don’t plan to host a ton of sites the default name will just do fine. You also get to choose an instance plan. I’d recommend going with the cheapest option first except you expect a lot of traffic on your blog. You can scale later if needed.

When you are ready, click the create button and just moments later your instance is up and running and you can see it on your homepage.

fresh instance

In the background, the Bitnami WordPress AMI will be used to create an EC2 instance on AWS.

Next thing you want to do is assigning a static IP address. This way your blog is always reachable via just that IP address and also you can, later on, create a DNS Zone in order to assign a domain.

ipTo do this click on your instance and navigate to the networking tab. Simply choose to create a static IP.

ip static

That’s it. We are ready … believe it or not, we have our WordPress instance up and running and it is reachable through a static IP.

wordpress initial page

Isn’t it amazing how quick that was?! So what are the next steps? One thing that needs to be done is to retrieve the credentials for the WP-Admin.

Getting your WP-Admin credentials

In order to get the login credentials for WP-Admin we need to log into our instance via SSH. Lightsail makes that really really easy and allows you to connect via your browser. It works for me when I use Google Chrome. So go back to your instance and click on the connect tab.

connect

Now choose to connect using SSH. Lightsail will open a new browser window and automatically log you in securely.

ec2console

When the machine got instanciated the username and password for WP-Admin were saved on the disk of the machine. You can view it by typing in the following command.

cat ./bitnami_credentials

Now go to http://your-static-ip/wp-admin and you can login using the credentials from the file. It is recommended to delete the bitnami_credentials file and also to change the default password.

We could start customizing WordPress now, but the next thing I’d recommend to do is securing your blog. Right now it is only possible to connect via HTTP. So when you login credentials will be sent over the wire unencrypted. You might think that for your small blog that doesn’t matter but believe me it does.

Assigning a Domain Name

In order to secure the site and implement SSL we first have to assign a domain name. We will do this by configuring a DNS zone. Go to your Lightsail homepage and then click on the networking tab. Now create a DNS Zone.

dnszone

Enter the domain that you want to route to your newly created WordPress instance. If you don’t have a domain yet, you first need to register one. Either through Amazon Route53 or any other domain provider. I register all domains with united-domains.de.

Once the DNS Zone is created you can specify A-records so that the DNS knows to which IP to route traffic when a browser calls the domain. Below is my setup for the purpose of this example.

arecord.PNG

The IP address is the static IP we configured earlier. Finally, you need to configure the DNS name servers at your domain provider. Check the documentation of your provider should you have questions. Once that is done as well you will have to wait until the DNS setting propagates and the domain actually routes traffic to your WordPress instance.

Jens Neuhaus posted a fantastic write up for creating and installing an SSL certificate using Let’s Encrypt. You can find his post here: SSL for AWS Lightsail WordPress. I followed his instructions one by one and it worked flawlessly.

wordpresssecured.PNG

This was a rather long post, so thanks for bearing with me. I hope you find it useful. Also, I’m planning on comparing this kind of hosting to hosting your blog on WordPress.com. Stay tuned.