Hosting Your Own WordPress Blog – Step 3 – Create a Hosted Zone Using Amazon Route 53

Step 3 – EASY

Hosted zones are easy to set up, but the control interface may not be easy to understand.

The goal of step 3 is to tie two very important things together: your domain name and your cloud server. Stated another way, you want your domain name to point to your cloud server.

You may notice that the server we created in step 2 has an address, and that we connected to it through the terminal. So we can certainly connect to our EC2 server, but the address is unruly and difficult to remember. To illustrate, here are all of the addresses that exist for infinitedab.com. Note that each of these will take you to the blog home page, but only one of them is what you’d want to share with your users:

As you can see, each of these are a real way to access a website. The first two are crazy though, and you wouldn’t expect your users to type those in. What your really want is the 3rd option: a website name tied to an IP. So let’s jump right in and use Amazon Route 53 to make this happen.

 

AWS Management Console Login
AWS Management Console Login

First thing we’ll do is log into the AWS console with our account here:  AWS Management Console. This is the same console we’ve logged into in step 3.

 

 

 

 

 

AWS Services
AWS Services

Once logged in, you’ll see a very large list of services (shown below). The services we’re interested in are: EC2, Route 53, and RDS. For this step however, we’re only interested in Route 53. Unlike “EC2”, I have no idea what “Route 53” means from a naming perspective. I’m Californian, so I think “Route 66” whenever I see this. Click on the Route 53 link. Use the search bar provided if you are unable to find it.

 

Amazon Route 53 - Create Hosted Zone
Amazon Route 53 – Create Hosted Zone

Once you arrive at the Route 53 dashboard, look for the “Hosted Zones” link in the left column. Click that and you’ll see a link to “Create Hosted Zone”. Click this button and you’ll be greeted with a “Create” dialog to the right. We want to create a new “Hosted Zone” entry here, then fill it up with SOA, NS, and A records. Enter your domain name and a comment, then click “Create”.

 

 

 

 

Amazon Route 53 - Sample Hosted Zone Created
Amazon Route 53 – Sample Hosted Zone Created

After clicking create, you will see something like the above. Note that two records exist: NS and SOA. We just need to create three A records now. Click the “Create Record Set” button on the top to get started. We will use the record entry field that appeared on the right to make our entries. After each entry we will click the “Create” button on the bottom.

 

Amazon Route 53 - Create Record Set
Amazon Route 53 – Create Record Set

Here is a summary of the records we are creating. Note that the first record will have an empty “Name” field, the second will have an asterisk, and the last will have a www. Also, for each entry you need to locate your EC2 IP Address by following the instructions further below:

  • Record 1:
    • Name:
    • Type: A – IPv4 Address
    • Value: [IP address of your EC2 Instance, e.g: 54.189.133.122]
  • Record 2:
    • Name: *
    • Type: A – IPv4 Address
    • Value: [IP address of your EC2 Instance, e.g: 54.189.133.122]
  • Record 3:
    • Name: www
    • Type: A – IPv4 Address
    • Value: [IP address of your EC2 Instance, e.g: 54.189.133.122]

 

Instructions: Finding IP address of your EC2 Instance:

EC2 Instance Public IP: IPv4 Public IP
EC2 Instance Public IP: IPv4 Public IP
  • First, revisit your EC2 control panel
  • Click “running instances”
  • Find your instance name, and click it or scroll right
  • Locate the IPv4 Public IP value. Our sample instance is: 34.221.223.243
  • Copy this value into each of your “A” record “Value” fields.

 

Once complete, you should have 3 “A” records similar to mine. As you can see, infinitedab.com has 5 total records (using the real ip of my ec2 instance, not the sample IP):

infinitedab.com Route 53 Records
infinitedab.com Route 53 Records

Congratulations!

You’ve completed step 3, which is ranked at EASY difficulty. Now onto step 4.

 


All Steps:

Introduction & Overview- Hosting Your Own WordPress Blog

  1. (EASY) Buying a Domain Name
  2. (HARD) Create a Cloud Server Using Amazon AWS
  3. (EASY) Create a Hosted Zone Using Amazon Route 53
  4. (HARD) Install Apache and PHP on Your Cloud Server
  5. (EASY) Create MySQL Cloud Database Using Amazon RDS
  6. (EASY) Download and Install WordPress on Your Server

Hosting Your Own WordPress Blog – Step 2 – Create a Cloud Server Using Amazon AWS

Step 2 – HARD

Creating a cloud server using Amazon AWS can be easy, if you’re used to it.

As stated in the introduction post, instead of buying a physical server, we’re going to set up our server in the “cloud”. The cloud service we will be using is Amazon AWS. It’s basically the gold standard for most large corporations, provides an amazing number of services, and gives you full control over your server, its size, pricing options, etc. The best thing is, you won’t have to worry about physical server hardware ever. You can simply increase or decrease your server size as needed, and pay for what you use. That’s great when you’re starting out small, and hoping to grow.

 

AWS Management Console Login
AWS Management Console Login

First thing we’ll do is log into the AWS console with our account here:  AWS Management Console.

 

 

 

 

 

 

 

AWS Services
AWS Services

Once logged in, you’ll see a very large list of services (shown below). The services we’re interested in are: EC2, Route 53, and RDS. For this step however, we’re only interested in EC2. For those of you unfamiliar with the acronym, EC2 means: Elastic Compute Cloud, or: create a cloud as big or as small as you want 🙂 Please click on the EC2 link. Use the search bar provided if you are unable to find it.

 

EC2 Instances Dashboard
EC2 Instances Dashboard

Once you’ve made it to the EC2 instances dashboard, click the “Instances” link on the left. I have 3 instances running currently, but you won’t have any yet (if you do, why are you reading this blog post?). Click on the blue “Launch Instance” button and choose “Launch Instance”. This will bring you to a list of “Amazon Machine Image” types.

 

As you can see, there are TONS of options. But we’re simple folk, so we’ll choose the latest LTS Ubuntu server. At time of this writing, that would be: “Ubuntu Server 18.04 LTS (HVM), SSD Volume Type – ami-0bbe6b35405ecebdb”. If you can’t find it in the list, copy and past the AMI id in the screenshot into the search field: ami-0bbe6b35405ecebdb. You should see a screen similar to mine on the left. Select that AMI.

Choose AMI
Choose AMI

 

 

Now we choose the instance type. To put another way, we choose how big we want our server to be. Feel free to experiment with different sizes and select the right fit for you. Remember, the larger the instance size, the more you’ll be paying for it on a monthly basis. In most cases, new websites and blogs can get away with a micro instance. You may even want to try a nano instance. Once you’re happy, click Review and Launch.

Choose Instance Type
Choose Instance Type

 

Feel free to ignore the “Review Instance Launch” screen. It provides important technical information about your instance which you already know, or don’t care to know. Simply click the Launch button in the lower right. This will bring up a new dialog in which you will create a key pair for your instance. The key pair is important, as it allows you to connect to your server.

Warning: if you lose your key pair, you will NEVER be able to connect to your instance again. You’ll have to start from scratch (which is a bummer). So store your key pair in a safe place! 

Now that you’ve been warned, let’s generate our first key pair by selecting the “Create a new key pair” option, entering a creative name like “MY_SERVER_KEY_PAIR”, and click the Download Key Pair button. Once downloaded, store the MY_SERVER_KEY_PAIR.pem file in a safe place. You’ll need it every time you connect to your server through FileZilla FTP and Terminal. Next, click Launch Instances and allow AWS to do it’s thing.

Key Pair Wizard
Key Pair Wizard

 

EC2 Instances Dashboard
EC2 Instances Dashboard

From the Launch Status page, click View Instances. This will take you back to the ECS Instances dashboard. You’ll notice that in the Status Checks column, your instance will be Initializing.

This is a great time to take a moment and appreciate what AWS is doing for you. First of all, they’re provisioning hardware on your behalf and assigning it an IP address. Second, they’re installing the AMI you selected earlier, applying a default security group, making your instance accessible, etc. And if you want… you can select your instance and terminate it. Hardware will free up, the IP you were assigned will go back into the pool, and you can start all over again. This crap is amazing…

Now is also a great time to give your instance a name. I’ve named mine SAMPLE_SERVER. But maybe you’ll want something more meaningful, like: INFINITE_DAB_PROD. Click on the little pencil icon shown below to open the edit field. Creating a meaningful name will prevent you from accidentally terminating your instance later, should you have multiple instances running.

Name Your Instance
Name Your Instance

Now that your instance is up and running, let’s connect to it. With the instance selected (blue dot on the left), press the Connect button at the top. It will open the following dialog box telling you how to connect. This is where our Terminal application comes into the picture.

Connect To Your Instance
Connect To Your Instance

The instructions provided say it all, but I’ll reiterate: Open an SSH client (the Terminal application), then run the example SSH command. Note that the file “MY_SERVER_KEY_PAIR.pem” should be in the same folder that you’re executing the command from. On my device, we default to the “home” folder, so I’ve copied the file there. Full path to the file looks like: /home/MY_SERVER_KEY_PAIR.pem. Execute the command like so:

Connect via Terminal
Connect via Terminal

A lot of the information provided in the terminal will not be interesting to you, so you can ignore it. What you’re looking for is a successful connection as indicated by the green line at the bottom:  ubuntu@ip-172-31-19-107:~$ This indicates that you’re connected and able to execute commands as the “ubuntu” user. Type “exit” into the terminal if you wish to disconnect for now.

Note: Not shown here is an additional step in which the terminal application asked me if I want to trust this host. The answer to this is yes, or else we will not be able to connect. So type “yes” into the terminal if prompted.

Congratulations!

You’ve completed step 2, which is ranked at HARD difficulty. Now onto step 3.

 


All Steps:

Introduction & Overview- Hosting Your Own WordPress Blog

  1. (EASY) Buying a Domain Name
  2. (HARD) Create a Cloud Server Using Amazon AWS
  3. (EASY) Create a Hosted Zone Using Amazon Route 53
  4. (HARD) Install Apache and PHP on Your Cloud Server
  5. (EASY) Create MySQL Cloud Database Using Amazon RDS
  6. (EASY) Download and Install WordPress on Your Server

Hosting Your Own WordPress Blog – Introduction & Overview

Introduction:

If you’re like me and want to set up your own WordPress blog, but don’t want to use any of the free or hosted options available, you’ve got a bit of work cut out for you. It’s not a difficult thing to do, but it takes some time. Because I don’t want you to have to learn on your own (and because I want to remind myself how to do this again later, with hopefully less headache), I’ll outline the steps involved, and hopefully help you get up and running.

If you’re asking why anybody would choose self-hosting over the ready-to-use free or hosted WordPress solutions, the answer is simple: flexibility. That is: the ability to have and control your own domain name, and monetize your blog however you wish.

Steps Overview:

Before jumping in headlong, you should have some idea of the basic steps required, and how each step ranks in level of difficulty. As you can see, there’s really not that much to it. But for the uninitiated (or the forgetful in my case), these steps might add up to a very long tedious day. I will outline each of these steps in detail later in the linked posts, but here’s an overview of each.

  1. (EASY) Buying a Domain Name
    • In this step, you’ll establish the name of your website, such as infinitedab.com, yourwebsite.com, etc. Here you will take ownership of a name by purchasing it from a domain name registrar (such as Google Domains). You will then continue paying for this name yearly.
  2. (HARD) Create a Cloud Server Using Amazon AWS
    • Instead of buying a physical server, we’re going to set one up in the “cloud”. You’ll have full control over this server, but won’t have to worry about physical hardware. In this step you’ll also determine who can connect to your server.
  3. (EASY) Create a Hosted Zone Using Amazon Route 53
    • In this step, you’ll connect your website name: infinitedab.com to the cloud server hosted by Amazon AWS. This establishes a link between your website name, and the “cloud” location (otherwise known as an ip address).
  4. (HARD) Install Apache and PHP on Your Cloud Server
    • In step 2, we technically created a cloud “compute” instance. In this step, we’ll turn that cloud computer into an actual server. This “server” will serve your website to your audience when they type in your website name.
  5. (EASY) Create MySQL Cloud Database Using Amazon RDS
    • WordPress requires a database to connect to, so in this step will create a cloud database. You could also set up a database on your cloud “computer”, but I wouldn’t recommend it.
  6. (EASY) Download and Install WordPress on Your Server
    • In this step, we set up WordPress on your new cloud server, run the initialization step, and rejoice at a job well done!

Prerequisites: Tools and Accounts You’ll Need:

No tutorial is complete without a list of tools and other prerequisites required to get the job done. Below is the complete list of what you’ll need:

  1. An active Google account (credit card connected). We will manage our domain name through Google Domains.
  2. An active Amazon AWS account (credit card connected). If you don’t have one already, create one now. It’ll take time for Amazon to green light your account, and I’m sure you don’t want to wait around. You can find Amazon AWS here.
  3. Free FileZilla FTP application. We’ll use this desktop application to copy files from our computer to our cloud server. You can download this application for Mac and PC here: Download FileZilla Client
  4. Free MySQL Workbench application (for sanity checks). We’ll use this desktop application to communicate to our database and confirm that it’s functional. This is a powerful tool, but we won’t do too much with it. Download MySQL Workbench
  5. Free WordPress software. This is the end goal: the lovely blog software that helps us share our creativity. You can download this software directly from WordPress.org: Get WordPress
  6. Free Terminal application (this comes pre-installed on a Mac. PC users will need to find an equivalent, such as the command line utility). We’ll use the Terminal application to communicate to our server and execute commands on the server’s “shell” (don’t worry, it’s all copy/paste).

Are you ready?

Let’s begin step 1: Buying a Domain Name

 


All Steps:

Introduction & Overview- Hosting Your Own WordPress Blog

  1. (EASY) Buying a Domain Name
  2. (HARD) Create a Cloud Server Using Amazon AWS
  3. (EASY) Create a Hosted Zone Using Amazon Route 53
  4. (HARD) Install Apache and PHP on Your Cloud Server
  5. (EASY) Create MySQL Cloud Database Using Amazon RDS
  6. (EASY) Download and Install WordPress on Your Server

 


Future posts:

In future posts, I’d like to cover additional topics, such as:

  • (EASY) Setting up Google AdSense on your WordPress blog (must install headers & footers plugin)
  • (HARD) Supporting SSL connections (https://)

 

Hosting Your Own WordPress Blog – Step 1 – Buying a Domain Name

Step 1 – EASY

Buying a cool domain name.

This step may sound easy, but you’ll probably spend a lot of time on it if you haven’t figured out a cool domain name yet. I spent forever finding infinitedab, and was blown away that the dot com version wasn’t taken.

For this step, I recommend purchasing your domain from the Google Domains service found at https://domains.google.com. I’ve used a lot of different domain name providers in the past (none of which I’ll mention here) but ultimately transferred everything I own over to Google Domains. Their billing is straight forward, and their tools are the best I’ve seen. I highly recommend using them, but you should use whichever registrar you prefer. Steps will be similar to what I’m showing below, regardless of which registrar you use.

After logging into Google Domains with your google account, click the: Find a Domain button (or search field). I’ve typed in “infinitedab” into the search field and was presented with the following results:

domain search results

As you can see, infinitedab.com isn’t available for purchase (for obvious reasons), but I’m interested in purchasing infinitedab.net for the sake of this tutorial. Likewise, use this search functionality to find the domain you want. Once you’re ready, click the +cart button provided, then click the shopping cart button on the top of the page.

 

 

Google Domains Cart Screen
Google Domains Cart Screen

From this checkout screen, choose whether or not you want privacy protection on (this is not available for some domains), and if you wish to auto-renew. I highly recommend you enable auto-renew, as domain renewals tend to pop up at the worst possible times. You don’t want to risk losing your domain on accident, and have to rebuild your brand from scratch with whatever similar name might be available. Don’t worry, Google Domains will send you email notification before a domain is set to renew.

 

On the Check Out screen you will enter your credit card information and click “Buy” (I’ll skip the screenshots for this one). Note: if privacy protection is not enabled for your domain, you will need to enter information that will be made public on the whois website. For an example of what this looks like for infinitedab.com (which has privacy protection enabled), here is a link: https://whois.icann.org/en/lookup?name=infinitedab.com.

 

Google Domains Purchase Complete (Helpful Links)
Google Domains Purchase Complete (Helpful Links)

Once your purchase is complete, Google will try to help you out with some convenient links. Feel free to ignore these for now.

Finally, you will be presented with the domain control panel screen below.  The most important link on this page is the DNS button on the right. We will use this button later once our AWS server is set up in step #2.

 

 

Google Domains Control Panel
Google Domains Control Panel

Congratulations!

You’ve completed step 1, which is ranked at EASY difficulty. Now onto step 2.

 

 


All Steps:

Introduction & Overview- Hosting Your Own WordPress Blog

  1. (EASY) Buying a Domain Name
  2. (HARD) Create a Cloud Server Using Amazon AWS
  3. (EASY) Create a Hosted Zone Using Amazon Route 53
  4. (HARD) Install Apache and PHP on Your Cloud Server
  5. (EASY) Create MySQL Cloud Database Using Amazon RDS
  6. (EASY) Download and Install WordPress on Your Server

Fortnite – Heidi – Dance under different Streetlight Spotlights

This music was stuck in my head the other day, and I couldn’t find any videos with a long enough play time to be worth while. This is the Heidi character performing the “Running Man” emote from Season 6 Tier 31 paid battle pass. The music is from the Season 6 week 1 “Dance under different Streetlight Spotlights (HARD)” challenge. (Not sure why that challenge was considered hard… it was more fun than anything.)

Quick note: the minor adjustments I make at the beginning and end of the video are to try and get the sound as clear as possible. Little rotations of the character mean the sound may shift to only one ear, which is no good if you’re listening to this on a stereo. Enjoy the cleanest audio I could create in playground mode!

もしもし世界!

Moshi moshi sekai! Hello World!

Been talking about setting up this blog for about 2 months now, and finally got around to doing it. It took about an hour of deciding which blog software to go with, and another hour of honest labor on AWS. Had to reference a few articles on stack overflow, and random Ubuntu/Apache/PHP startup articles.

Now that the boring stuff is done, I will try to post some video content tonight. We’ll see how it goes.