Easy WordPress blog with AWS
Although there's a lot of information out there about how to get a blog like the one this blog is replacing online using Amazon Web Services, I couldn't find anything that would hold my hand through the entire process. While sometimes the fun of it is exploring how to get things to work, there are also situations where you just want to be able to punch it out quickly and be done with it. So, I'm reposting this step-by-step guide from my old blog. If you're encountering one of those, here you are:
Step 1: Sign up for AWS. Go to aws.amazon.com, click sign in and follow their flow.
Step 2: Register your domain name. Justhost, godaddy, and many other registration sites offer just domain name registration for a pretty small amount. They'll try to upsell you on all sorts of hosting, privacy, etc, but you really just need the domain name. (Disclaimer--this is not meant to be advice about what's appropriate for your needs, just stating what the minimum requirements are to set up a blog like this one.)
Step 3: Go to stack creation. Go back to AWS, log in and click on "AWS Management Console," or find it at https://console.aws.amazon.com/console/. From there, you can find "CloudFormation" which allows you to quickly activate all of the resources that you need at one go.
Step 4: Create a web server with the WordPress blog. Click "Create Stack" then choose the "Use Sample Template" option. You can find WordPress blog in the dropdown menu. The name in this step can be whatever you like it to be. On the next page, you'll be prompted for some configuration. You can use whatever password you like for the database, but be sure to enter t1.micro for the EC2 instance type if you want to fall under the free usage tier. Next, you'll be prompted to add tags. If you're not an AWS user for other needs, there's no need to bother with these. Finally, you should be able to hit create. You'll wait a few minutes and your web server will be ready to go.
Step 5: Connect your domain with your web server. There are a few elements to this step. You'll need to use the route 53 service in AWS and this will cost money. Unless you are getting a lot of traffic to your blog, $0.51 will be the usual amount per month. Hardly a deal-breaker. Find route 53 in the AWS Management Console, then hit "Create Hosted Zone." You'll enter the domain name that you purchased from whatever registrar you used and hit create. Next, you'll see that hosted zone listed in the route 53 management window. Click on it and hit the "Record Sets" button. At this point, I'm going to do something really terrible to you and refer you to an 18 min youtube video that explains exactly how to make route 53 work. I will come back and give more succinct directions soon. Here's the link.
Step 6: Make your blog domain match your website domain. At this point, you should be able to visit your blog through the domain name that you bought, but you'll notice that if you try to navigate around, you'll end up back in that nasty ec2-... AWS domain. To fix this, go to the WordPress dashboard, then to Settings->General in the left hand navigation bar. There are two spots on that page where there's a textbox with a URL. One is the installed directory, which shouldn't be changed. It's called WordPress Adress. The other is the Site Address, which you can change to http://yourdomain.com/wordpress. Save your changes and you should be ready to go.
Step 7: Set up Google Analytics to monitor your traffic (optional). There are numerous plugins for making this work in WordPress. The easiest I've found is the Google Analytics plugin by Kevin Sylvestre. Search for that plugin (in the Plugins section of the left sidebar) and hit install. It might give you a warning that it hasn't been tested with your current version of WordPress yet. I got that and it hasn't been an issue (yet, at least). Go ahead and activate that plugin for WordPress. Next, you'll need a Google Analytics account. Go to analytics.google.com and use your regular gmail or other google account to sign up. Once you're in Analytics, go to the Admin button on the right hand side of the orange toolbar at the top. Click the new account button and fill in the information. The only things here that need to be done in any particular way are that you should be tracking a website (not an app) and your domain needs to match the one you bought from the registrar. Hit "Get Tracking ID" when you're done. The tracking ID that comes back at you (UA- followed by a bunch of numbers then dash number) should be copied. Go back to WordPress and go to Settings->Google Analytics in the left hand sidebar. Paste your tracking code where it asks for it and hit save. Last step, you should check to be sure that everything is working. In Google Analytics, go to the "All Accounts" dropdown in the upper left and chose your blog. Click "Home" in the orange toolbar and then "Real Time" in the left hand sidebar. You should be able to see a visit show up if you navigate to your blog in a new tab.