How to Install WordPress on AWS (Amazon Web Services)
Amazon is known for its online shopping portal, but if you dig deeper, you’ll realize that they’re way bigger than you’ve imagined them to be. AWS is a powerful cloud computing platform that lets you harness their superior infrastructure for your own online projects. In fact, it’s so powerful that quite a few top companies in the world use it, including Netflix, BBC, LinkedIn, Facebook, and you guessed it, WPMU DEV too.
AWS is usually reserved for larger projects, but you can still take advantage of its power and scalability if you’re up to the task. In this step-by-step tutorial, I’ll show you how to install WordPress on AWS in just a few minutes.
What is AWS?
Amazon Web Services (AWS) is a flexible and secure on-demand cloud computing platform. Think of it as renting a bunch of computers to do whatever you wish, including setting up a server to host your WordPress website.
AWS uses a pay-as-you-go pricing model, so you’ll only pay for the cloud infrastructure and resources you end up using. Depending on your use case, this can be a huge advantage or a big drain on your pockets.
Why AWS for WordPress?
There are many advantages of going with AWS for hosting your WordPress site. Here are the most important benefits:
- Complete Ownership: AWS gives you total access to servers, storage, databases, and other application services. While AWS only owns the hardware for running these services, you’re in complete control of the server, including all your data.
- Agility: Though the era of move fast and break things has kinda come to an end, the philosophy still endures. The cloud gives you easy and fast access to a broad range of technologies, so that you and your team can innovate faster.
- Better User Experience: The AWS service is blazing fast, as its maintained by Amazon in multiple locations all across the world. This means lower latency and faster load times, and thus a better experience for your users.
- Highly Scalable: With AWS, you have access to as much or as little computing infrastructure. You can scale up and down at the click of a button as per your website’s needs.
- Cost Savings: The cloud allows you to own a server without any capital expense like data centers, servers, etc. And since Amazon takes care of all the infrastructure at scale, they can provide the service for you at a significant discount.
This tutorial is the quickest and most economical way to get WordPress up and running on AWS. It’s perfect for websites with low traffic or no strict high availability requirements. If you’re looking to set up WordPress on AWS for a high traffic site, you can still scale up this deployment later easily.
Let’s Deploy WordPress on AWS
Step 1: Sign Up for an AWS Free Tier Account
AWS Free Tier gives you a 12 months free, hands-on experience with most of the services offered by AWS platform. It’s the best way to get started with AWS. Sign up for an account here.
Step 2: Go To Your AWS Management Console
To start off, log into your AWS account and open the AWS Management Console. This is the dashboard from where you can access all its features and settings.
Step 3: Launch an Amazon EC2 Instance
In your AWS Management Console, find EC2 under Compute in the All Services section, and click on it to open the EC2 dashboard. Here, click Launch Instance to create and configure your EC2 instance.
Step 3: Install WordPress on your EC2 Instance
The AWS Marketplace has a variety of Amazon Machine Images (AMI) that you can use to quickly setup a good deal of common software. The AMIs are usually pre-configured with the ideal settings for running on AWS. We’ll be using one such AMI to install WordPress.
Click on AWS Marketplace on the left menu, search for WordPress, look for WordPress powered by BitNami, then hit the blue Select button.
Step 4: Confirm the Pricing for Your Instance
You’ll be presented a detailed pricing page. Don’t fret. Here, the price will be $0 for the software stack we’ll be using, regardless of the size of the instance. Scroll to the bottom of the pricing list and select Continue.
In this tutorial, we’ll be using a free-tier eligible t2.micro instance. Click on t2.micro in the Type column, then click Next: Configure Instance Details. It may take a few seconds for it to load.
In the following screens, click Next: Add Storage and then Next: Tag Instance.
Step 5: Set the Key and Value Pair
Set a name for your instance. Enter Name in the Key box and WordPress in the Value box. Click Review and Launch to continue.
Step 6: Review the Instance One Last Time
Here, you can review your instance configuration before clicking Launch. This will initiate your Amazon EC2 instance running WordPress.
Step 7: Configuring Key-Pair for SSH
Key-pairs are how you can connect to your EC2 instances with a terminal program using Secure Shell (SSH). If you don’t know anything about SSH, you needn’t worry. Just keep in mind that you need to have a key-pair if you want to log in via terminal. We’ll not be setting a key-pair here for this tutorial.
Select Proceed without a key pair, and check the box to confirm that you know you need this key to access your EC2 instance.
Click Launch Instances to launch your instance. It may take a few minutes to start the instance.
Note: If you want to create a new key-pair, follow the Step 3.d in this detailed tutorial by Amazon.
Step 8: Is Your WordPress Instance Running?
Click View Instances on the bottom right (you may need to scroll down). Then select the WordPress instance to make sure that the Instance State indicates a green dot with running value. If Instance State says launching, then AWS is still preparing your WordPress instance and you’ll have to wait till it’s finished to move to the next step.
Step 9: Test Your Site
Once your instance is running, you can now test your WordPress website. To do that, find the Public IP for your instance at the bottom of this page. This is your WordPress site’s URL.
Copy the Public IP into a new tab in your web browser, and hit Enter. You should see the familiar Hello World WordPress home screen (the theme may vary depending on the installation type).
And there you go! You’ve successfully installed a new installation of WordPress on your AWS EC2 instance.
Step 10: Configuring Your WordPress Website
Now that you have your WordPress site up and running, it’s time to log into its admin page, so you can customize its settings. But to do that, you must find your admin password. By default, Bitnami assigns a random password to every new WordPress installation. Here’s how you find that:
Go back to your EC2 dashboard and select your WordPress instance. Then, click the Actions button. In the drop down menu, select Instance Setting > Get System Log.
Scroll through the system log window to find the password. Hint: You can find it surrounded by a box made up of hash symbols (#). Copy the password to an external file.
Go to your WordPress website. Add
/admin to the end of its URL, so it looks something like
Your.Public.IP/admin. Hit enter. This will take you to your WordPress site’s login page.
To login, enter the default username (user) and the password that you just copied.
Congratulations! You can now manage, customize, and configure your WordPress site as you like. I suggest you to change your username and password right away.
You can work on this WordPress site to finalize its content & design. Once done, you’d want to point it to your custom domain name, so that your users can access it by typing it in their browsers. Here’s a simple guide by Amazon on how to do that. It’s also recommended that you set up monitoring and notifications for your instances.
Deploying a Highly Scalable WordPress Site on AWS
The site we built here is good enough for a simple blog or a low-traffic business website, but if you’re looking to build a more robust site for a business with high traffic, you need to go further. And this doesn’t come cheap. Here’s a great guide by Amazon on how to deploy a production-ready WordPress website on AWS.
Further Reading: This white paper by Amazon details how to improve both the cost efficiency and the user experience of your WordPress deployment. It also outlines how to address common problems associated with scalability and high availability requirements.
Great Freedom, Greater Responsibilities
Hosting your WordPress site on AWS can give you complete freedom over your server along with amazing performance, but setting it up is highly challenging. And maintaining it is even more so, especially if you’re unfamiliar with server management.
On a cloud host, you’re responsible for updating your server’s software packages and maintaining its security patches. You’re also in charge of making sure that the server’s resources are properly scaled as and when needed. And lastly, you need to take care that you don’t go broke when you finally see the bill.
Plus, you need to make sure that your site is live at all times, and troubleshoot any problems it may have if it goes offline.
There’s a common joke in sysadmin communities. “Being a sysadmin is as easy as riding a bike. Except, the bike is on fire, and you’re on fire, and the road is on fire too. In fact, everything is on fire!”
That’s where a managed WordPress hosting solution like WPMU DEV Hosting comes in. It gives you the same performance as cloud hosting, but without worrying you about maintaining the server or its security. The pricing is fixed too. Everything’s taken care of for you by experts who live and breathe WordPress.
However, if you think you can take on the challenges of being a server admin, more power to you. Sysadmins rule!
1.6 million WordPress Superheroes read and trust our blog. Join them and get daily posts delivered to your inbox – free!