Moving from a popular hosting provider – whether generic (i.e. GoDaddy) or WordPress-specific (i.e. SiteGround) – over to AWS can be a bit daunting at first (I know it was for me!). With this handy guide, however, you can get a new WordPress site up and running on an EC2 server in less than 10 minutes, getting familiar with AWS along the way.
Install WordPress on AWS Quickly with a Bitnami AMI (Amazon Machine Image)
There are multiple ways to get a WordPress site running on AWS, but here we’re going to use EC2.
To get started, go to AWS and either set yourself up with an account or login to an existing one. You should then see your ‘AWS Management Console’ once you’ve signed in.
Use the search box under ‘Find Services’ to search for “EC2” and click the result when it shows up.
When you land on the EC2 service page, you should see an orange ‘Launch instance’ button. Click it and from the dropdown select the ‘Launch instance’ option.
This will start the simple step-by-step process for setting up your new server running WordPress.
Step 1 – Choose AMI
The first step is choosing an Amazon Machine Image (AMI) to base your new server (or instance) on. AMIs are essentially blueprints for pre-configured servers, so by selecting one you can start with anything from a simple Windows machine to a ready-to-go VPN or CRM.
In this case, we’re looking for an AMI which comes with WordPress pre-installed. There aren’t any Quick Start AMIs suitable for us at this time, so we need to go to the ‘AWS Marketplace’ first. Click this option on the left-hand menu and you’ll see AMIs that have been created by Amazon’s community of partners.
From here, search for “wordpress” and you’ll be presented with a few different options. Bitnami are well-respected and provide a variety of options, so we’re going to use their “WordPress Certified by Bitnami and Automattic” AMI in this example.
Click the blue ‘Select’ button next to the AMI and you should see some pricing show up. There’s no cost associated with the use of this AMI or the software it uses (there are others that do charge so look carefully if you choose an alternative AMI). The pricing that is shown is for running the server / instance, depending on the performance you need.
Click ‘Continue’ and we’ll move on to the next step.
Step 2 – Choose Instance Type
You’re then presented with the list of instance types you saw in the pricing list. The instance type you choose is completely up to you, but it’s useful to know that the t2.micro is currently included in the Free Tier, so this is always a good place to start if you’re just testing AWS or running a small website or blog.
Select your instance and click the grey Next : Configure Instance Details button to move on to the next step.
Step 3 – Configure Instance
Here you can configure the specific details of your instance; networking, access, monitoring and more. Ultimately, we don’t need to change anything here so let’s just leave the default selections.
Click the grey Next: Add Storage button to move on.
Step 4 – Add Storage
We now get to choose the number and size of hard drives associated with our new server, as well as a couple of other options. This is where WordPress will be installed – along with its media files, etc.
We only need one hard drive / volume and the default will be 10GB, which is fine. If anything it might be overkill for a basic WordPress site and this will eat into your 30GB Free Tier allowance of 30GB, so consider dropping it down a bit. WordPress will only need about 1GB, but give yourself some room to breathe (3GB or more would be good).
With that sorted, click Next: Add Tags to continue.
Step 5 – Add Tags
Tags aren’t essential, but it can be good practice to add them to your instance. They come in Key / Value pairs and are completely flexible in that you can type what you want.
For this example, we’ll create a tag with a key of “Website Name” and just put the name of your website in the value field.
Click Next: Configure Security Group to move on to the penultimate step.
Step 6 – Configure Security Group
This step is all about security. AWS gives you a lot of control over who and how users can access an instance, and this configuration screen is a good example.
A Security Group is essentially a set of access permissions. It breaks down the type of access needed – e.g. SSH, MySQL, HTTPS – and then the IP address (or range of addresses) that are allowed to access it. Public access can be granted by entering 0.0.0.0/0 into the Source field.
All I would do here is change the Security group name to something more specific for your purposes, such as “WordPress testing” so that it’s easy to find later on if you need to tweak it or use it again for another instance (in which case you would select the Select an existing security group option on this screen).
Once you’re done, click the blue Review and Launch button to move on to the final step.
Step 7 – Review
The final step is simply to review all of the settings that we’ve configured throughout each of the previous steps.
You can safely ignore the message at the top for now regarding your instance being “open to the world”. This is showing because public access was granted in the security group settings, but we need our website to be publicly accessible so it’s fine.
Now we’re ready! Click the blue Launch button and off we go! Well, almost…
After clicking the button a window will pop up referring to key pairs. This is a very strong security feature which might feel too much for some (especially those used to shared hosting providers) but it’s worth getting used to using them now.
Select Create a new key pair from the first dropdown list if it’s not selected already, then give your key pair a name, such as your website name.
Once you’ve done that, click the grey Download Key Pair button and it should download a small file. Verify that the download completed fully and that you know where the file is stored before moving on a clicking the blue Launch Instances button.
You should see the Launch Status page next while AWS sets up your new instance.
When it’s done, you should see a green tick with some text at the top of the Launch Status screen. From here, click the blue View Instances button in the bottom right of the screen.
This screen lists your EC2 instances. If you’re doing this for the first time, you should see just one and by now it should say “running” under the Instance State column with a green circle. If so, congratulations – your new server is up and running!
The final thing to do is to take a look at your new WordPress site, so select your instance from the list and find the entry in the lower area of the screen labelled IPv4 Public IP (which should be on the right, near the top of the list). Copy the IP address listed here and paste it into a new tab to see your WordPress site up and running.
If all has gone to plan, you should see something like the screenshot above.
If you started with little or no experience of AWS, you’ve come really far; you’ve now setup your first server with a live website running WordPress.
Have a poke around, but you’ll certainly have some questions and the guides below should help with that.