Cloud computing has taken the world by storm. It’s the most cost-efficient, secure, and reliable way to host any online project. And Amazon Web Services (AWS) sits right at the top, showering us with its amazing and powerful cloud infrastructure.
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, and even Facebook.
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 with them as 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.
Step 3: Launch an Amazon EC2 Instance
In your AWS Management Console, find EC2 under Compute, and double-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 lot 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.00 for the software, regardless of the size of the instance that you use. Scroll to the bottom and select Continue.
For this tutorial, we will 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.
On 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 configurations before clicking Launch. This will start 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 to log in to your terminal. We’ll not be setting a key-pair here.
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.
Step 8: Your WordPress Instance is Running?
Click View Instances on the bottom right (you may need to scroll down). Then select the WordPress instance, make sure the Instance State says running. If Instance State says launching then AWS is still preparing your WordPress instance.
Step 9: Test Your Site
Once your instance is running, you can now test your WordPress website. Find the Public IP for your instance at the bottom of this page.
Copy the Public IP into a new tab in your web browser, and 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 first. Here’s how you do 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 hash marks. Copy the password to an external file.
Go to your WordPress website. Add
/admin to the end of the URL, so it looks something like
18.104.22.1685/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, but 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 to set up monitoring and notifications for your instances.
Deploying a Highly Scalable WordPress Site on AWS
The site we built here is good for a simple blog or a low-traffic business website, but if you’re looking to build a WordPress 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.
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. All this on top of making sure that your site is live at all times.
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!