- 1. Introduction to Cloud Computing with WordPress
- 2. Install & Configure WordPress in DigitalOcean
- 3. How to Install WordPress in Microsoft Azure
- 4. How to Install WordPress on the Google Cloud
- 5. Currently Reading: Install WordPress in AWS – Amazon Web Services
- 6. Installing WordPress Manually On Any Web Host
Welcome to a brand new guide on the Installing WordPress on the Cloud series. Today we’re going to learn how to install WordPress in Amazon Web Services (AWS). Just like our previous cloud installation guides in Microsoft Azure and Google Cloud, we’ll be using a pre-installed image of WordPress.
Now before we get started there are a few key terms I’d like to discuss in order to get a preliminary understanding of how AWS works.
How Big is AWS?
For starters, let’s get this – AWS is huge. I mean insanely huge. It’s one of the oldest cloud hosting providers in the Internet. It’s got tons of services – from encoding live video to analyzing rapidly streaming data from satellites and other high-performance sensors spread across the globe.
Here’s something that’ll give you an idea just how powerful AWS is – NASA – yes, NASA, used AWS’ cloud computing infrastructure to process data from the Mars Rover mission. But we’ll be installing a small instance of WordPress, right? AWS has got our back! Let’s dig into the essentials.
Amazon EC2: Known as Elastic Cloud Compute, think of this as a computer in the cloud. You don’t need to know where it exists, who cleans and dusts the hardware or what happens when the power runs out. That’s for Amazon to handle.
What you need to know – the only thing that you need to know – is the technical specifications of the server – err, the computer. That’s it. That’s the beauty of the cloud.
Amazon Machine Image: AMI – as developers like to call it (let’s call it that because it sounds really cool), is nothing but an instance, or a computer with an operating system with a bunch of other software pre-installed.
Imagine you install Windows 10 on your new PC and then install some applications like MediaMonkey, Microsoft Word and Google Chrome. If you were to export an image of the OS in the current state, you’d have a machine image. When we say export we mean to a file which when plugged in to another similar device would run without any installation. People working with Linux do this (i.e. create machine images or snapshots) all the time. This is also vaguely the idea behind Docker.
Why are we talking about Amazon EC2 and AMIs?
Good question. Now since we’ve established that we need EC2 is like a computer/server in the cloud, we’ll be using a single instance of Amazon EC2 (also called an EC2 Instance) to host our WordPress site.
But wait. You have the machine – yay! But what about installing the operating system? Do we choose Linux or Windows? Linux? Fine. But wait (again) – which flavour of Linux do we choose? Ubuntu? Fedora? Debian? Let’s say I choose Ubuntu. Fine. Which version do I choose? Aarrghh! Too many choices for one small objective!
If that’s not overwhelming, think of the next process. We’ve got to install the host of software that’s required to run WordPress – the LAMP stack. Once that’s installed and configured, you’re going to have to install and configure WordPress. Missing permissions, directory access and the whole lot.
I don’t know about you, but that is a LONG process. Long in all caps and bold. You’ve probably guessed where I’m getting at now – and you’re right. This is where the Amazon Machine Image comes into play.
Imagine someone deployed an EC2 instance, installed Ubuntu, updated it, and installed WordPress on it – along with all its required software (like the LAMP stack). The person then created an image of the OS in its current state – i.e. – an untouched, essentially “ready-to-use” installation of WordPress. That would be the example of a perfect AMI with WordPress installed in it. Now you can stop imagining, because there exists such an AMI and it was created by Bitnami. (Yay!)
“How about a Marketplace for AMIs?”
AWS Marketplace with Content Management AMIs
You asked. Amazon listened. Amazon has a marketplace called the AWS Marketplace – a place where we can buy (yes, buy) pre-configured machine images for various software, that are otherwise difficult to install. The idea is to simplify your hosting process so you can deploy your app to the cloud as fast as possible. This is very similar to what Google Cloud and Microsoft Azure offers as application images or templates.
Luckily most popular open-source software have free AMIs – which is incredibly useful for beginners like ourselves. One of the most popular contributors of free AMIs is Bitnami – a company that provides up-to-date AMIs for the most popular open-source software – including WordPress!
So there we go. EC2 for hosting our WordPress installation. A WordPress AMI from Bitnami to save us the installation process. Now all we have to do is link them together.
EC2 Instance + WordPress AMI = WP on AWS Cloud in 2 Minutes!
Setting Up Your Free Amazon Account
AWS Free Usage Tier Limitations
AWS’ free account includes a lot of perks and it’s active for one full year. That’s the highest amount of gratis time we’ve received form any cloud provider. However, we do have certain limitations.
For a complete list you could check out the AWS Free Tier homepage, but for our purposes, we need to know just this:
- One Micro instance of Amazon EC2 is allowed in the free tier, for 750 hours each month – which is enough to keep WordPress up and running for 24x7x365 hours.
- 5GB of Amazon S3 storage, which we might use as a backup location for our other websites.
To be honest, the lengthiest part of this tutorial is setting up your free Amazon Web Services account. It’s easy as 1-2-3, but nonetheless it is a lengthy process. You’ve got to:
- Sign up with a new email address
- Use a valid credit card or debit card to verify your account
- Use your mobile number to link your account (Amazon will call you and you’ll have to enter the verification code)
Please note that you should not use a prepaid credit card or a virtual credit card service (like Entropay) in your AWS billing account. Although it’s technically okay, I’ve tried that and it’ll only get your account banned. So, please use a valid card. If you’ve followed all the steps properly, your account will be activated in minutes and you can get started with the WordPress installation procedure.
Step One – Installing the WordPress Image from AWS Marketplace
Head over to the AWS Marketplace > Content Management > WordPress powered by Bitnami. That’s the image we want to install. If you’re wondering why we haven’t created an EC2 instance so far – first off, pat yourself on the back for asking that brilliant question.
Okay, so we haven’t done this so far because AWS lets us configure an EC2 instance directly from the AMI page. This keeps things simple, since we don’t run the risk of overwriting a previously configured EC2 instance with the new AMI.
The WordPress AMI by Bitnami page – Click on Continue to get started!
1.1 – Create the WordPress AMI
- Version: Select the latest version of Ubuntu.
- Region: Select any US region.
- EC2 Instance Type: This must be a t1.micro instance. Anything greater and you’ll be billed.
- VPC Settings: Leave this as it, it’ll auto-configure itself based on your region.
- Security Group: Although it shows a warning, select Select new based on user settings. Here the user is the developer of the AMI (i.e. Bitnami).
- Key Pair: Creating the Key Pair is a 3 step process. Although optional we recommend creating one as it enables you to login to your EC2 instance via SSH.
1.2 – How to Create a Key Pair in EC2
Make sure that the regions you’ve selected for the EC2 instance and the one shown in your AWS Console is the same. Else the process wouldn’t work.
1. Click on the 1st hyperlink in this screenshot.
2. You’ll be redirected to your EC2 console. Click on Create Key Pair.
3. Type in a distinguishable key pair name and click on Create.
4. A new key-pair will be created.
1.3 – Launching the WordPress AMI
Go back to the previous tab and refresh the page. You should now see the option to choose the new key pair you just created. Make sure that you’ve selected the t1.micro instance once again, before selecting Accept Terms and Launch with 1-Click.
Seconds later you’ll be greeted with this message. Now you’ve successfully deployed the WordPress AMI. Time to check it out.
Step Two – Configuring the WordPress AMI
The AWS EC2 Dashboard
Head over to your AWS Console and select EC2. This will open your EC2 dashboard. You should see the text 1 Running Instance on the top-middle section of the page. Click on that text.
EC2 Dashboard displaying the active instances
This would display the list of EC2 instances in your AWS account. We’ll have just one, which is our WordPress installation. Next, up, copy the sub-domain mentioned under Public DNS. That’s your WordPress installation’s URL. Paste it in a browser to view your (freshly installed) WordPress site!
2.1 – Retrieving the System Generated WordPress Administrator Password
Remember the famous 5 minute WordPress installation? Well, Bitnami takes care of that as well. But hey! What about your WordPress username and password?! Well, the default username is user and the password is system generated – i.e. it’s randomly generated when the WordPress AMI was being installed. We’ve got to find that out now. To do so, follow these upcoming screenshots:
From your AWS EC2 Instances Dashboard (the second screenshot under Step 2) click on Actions > Instance Settings > Get System Log. This displays the entire system log right from when the WordPress AMI was being installed.
A typical System Log generated by an EC2 Instance
Scroll right down and you’ll find the randomly generated password for WordPress. Copy-paste that to your WordPress login from and you’re good to go!
WordPress on AWS using t1.micro EC2 and the Bitnami WordPress AMI
Since Amazon provides one full year of free usage, it would be a great way to test out your actual WordPress website or blog. You’d save a whole year’s hosting cost and experience the power and simplicity of the cloud. Simply point your domain’s A record to the Public DNS of your EC2 instance and you’ll have a fully-fledged WordPress site!
We hope you learnt something new from this tutorial and enjoyed reading it as much as we enjoyed curating it. If you have any comments, suggestions or questions, I’m always available at @souravify. Now go and enjoy the power of the cloud – free for one whole year, courtesy of AWS!