Let me start by saying that there are tons of options other options for hosting and running a WordPress website/blog. I choose to sit down and learn about how I can host and run one myself rather than pay a company to host. I have experience running servers and writing code as such I wanted to get more experience in the cloud world that.
Using a service to host and speed up the process can be as simple as a couple of buttons. My goal is to help those who wish to learn a little about how I handled setting up my own WordPress on AWS.
Web Host
The first thing I look at is cost, how much will this cost me? The trick is to understand the cloud and what you can use as a free option. We will only be looking at AWS, but the options for Azure and Google are there and have similar benefits. As of writing this, I pay around $3-4 a month for my EC2 or server and another $7 for my RDS MySQL database. I could however host my database on the EC2 server saving myself the $7, my reason behind using RDS instead was a pure learning experience in which I’ll explain more in detail below.
Cost & Budgeting
Now you are probably wondering, how is it so cheap? Reserved Instances on AWS. First starting off, you can use the free tier for a whole year without paying for anything, this makes learning even better and allows you to get started on your own blog or website without any real cost behind it (minus paying for your Domain Name – website name).
To explain what RI (Reserved Instances) are first we must set up an EC2. You can follow the steps in this guide to get started. Once you created an instance, the next step is to buy a RI. What we are doing here is paying for a term (1 or 3 years) contract, it’s not refundable. As long as the RI you purchased matches the EC2 type, it will be applied. You can set up a budget check to ensure it’s being used. Read more here.
The Reserved Instances can also be applied to the RDS service that would allow you to pay about $5 a month to have a standalone database instance. One benefit that I liked about having RDS separated from my EC2 (WordPress) was I could add an extra layer of security to it using Security Groups. On top of that, the automated backup snapshots that RDS provides makes it easy to revert and restore to a point in time, of course, you pay for this, but it does create a nice simplicity to it. With all that being said, the cheapest and easiest setup is to just use MariaDB within on the Amazon Linux 2 AMI that the WordPress is being hosted on currently.
Differences
The best thing about owning this whole process is the flexibility you gain by understanding how the web and cloud work. By taking the time and learning, you not only save time in the future but also money. Most of the time, you won’t even take advantage of half the features that are given to you from hosting sites.
Let’s take, for example, Bluehost, their basic site cost 2.95 to start (first month) then 8.99 each month after that with a contract (36/mo term). They provide some custom themes, some sort of 24/7 customer support, and some storage but in short, most of these things are really needed due to so many free themes and online support from forums and such. The facts are that you probably won’t ever hit the max storage as a simple blogger, and if you are, then you are probably making enough money to upgrade AWS storage (.10 per GB) or using S3 Buckets.
Bluehost states some free items, one being a domain, CDN, and SSL Certificate. Using them to set up your domain is pretty rough as they would be the ones owning it and require you to transfer it when you want to move providers. A domain costs $12 for a dot com through all cloud providers. There are tons of free options for CDNs and should be considered instead. Finally, a “free” SSL certificate, can be obtained using Certbot (Thank you!) and LetsEncrypt, which is already free with an auto-renewal feature!
Please note, I’m not trying to attack any hosting service, I’m using them as an example and explain why hosting can save you money and provide more control in the long run. Using a hosting service can make anyone’s life easier and get you up and running faster, for a cost. I prefer to use things that are in my control and rather not wait on someone to help or do something in addition to this I prefer to pay for what I use keeping my cost way down.
Resources
- https://aws.amazon.com/getting-started/hands-on/deploy-wordpress-with-amazon-rds/… This was a help site to get a new RDS(MySQL) database that was separated out from my EC2.
- https://greggborodaty.com/amazon-linux-2-upgrading-from-php-7-2-to-php-7-4/… This made sure I was updated to at least PHP 7.4, 8.0 is available and I plan on upgrading to that once I’ve read through some of the changes.
- https://wpbeginner.com/wp-tutorials/how-to-move-wordpress-to-a-new-host-or-server-with-no-downtime/#setupduplicator… I tried a couple of others with confusing results and no luck. Thankfully for @wpbeginner, they had the above article. The duplicator plugin was the easiest thing to use when trying to migrate my whole WordPress site to another server.
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html#letsencrypt…@EFF@letsencrypt#Certbot Can’t forget to make sure the site is on HTTPS! They made it so easy to get a certification and auto-renew that it’s crazy.
- https://certbot.eff.org