A few weeks ago I wrote a short tutorial How to host a static website on Amazon. I think it is a great solution for many website owners, even small businesses, however is not perfect for everyone. Many people need more advanced web applications for publishing hundreds of posts and pages stored in database, sending emails, and so on. In other words, they require Content Management Systems rather than simple but difficult to maintain static pages.
You can host these advanced applications on Amazon Elastic Compute Cloud (Amazon EC2) and in this tutorial you will find out how to host a WordPress site. Since WordPress is probably the most popular platform on the Internet at the moment, some say that 25% of all websites use it, it make sense to present tutorial for this particular solution. Today we will just cover launching a new website but in the following tutorial I will also show you how you can link your own domain name to this new EC2 WordPress application.
Before you start, you need to be aware that some of EC2 services are payable. If you want to avoid an unexpected bill you need to do some research and check the prices before launching your WordPress site.
How to host WordPress website on Amazon EC2
If you do not have the account, head to aws.amazon.com and open it.
Once you opened the account, log in and find a link EC2. I have found this link at the top of ‘Compute’ section.
Next, click on the Launch instance button.
You will be presented with many different application. To find WordPress, on the left hand menu click on AWS Marketplace and type ‘wordpress’ in the search bar. You should find and instance called WordPress Certified by Bitnami. Click on Select button on the right hand side.
You will see some details regarding pricing, in case of this software it should be $0 as this is eligible for Free tier. Click on Continue. On the next page mark the General purpose, t2.micro Free tier eligible row (in my case it was the second from the top) and click on Next: Configure Instance Details.
You will be redirected to another page. On the following screen click Next: Add Storage and on the next page Next: Add Tags.
In the following page, click on the Add Tag button. Then put “Name” in the Key box and ‘WordPress’ in the Value box. Next click Review and Launch button to continue.
You should be presented with this screen (I intentionally clicked on Tags to reveal them). Click on the Launch button to create your application.
A small window will pop out, choose Proceed without a key pair from drop down menu, tick the box I acknowledge … and click on Launch Instances button to continue.
At this point your should be redirected to another page and your instance should be created. Click on the View Instances button on the right hand side to see it. This is the screenshot of my instance, yours should look similar:
You can quickly find out your website public IP address (either in the column or in description below). Copy this IP address to a new tab in your web browser and see if the website is running. If everything went well, you should see generic WordPress homepage. Depending on the version WordPress it could look like that:
Now, you need somehow to log into your website to use it. Go back to your web browser tab showing active instances. If you have closed it , log on back to aws.amazon.com, click on EC2 and click on the link 1 Running Instances).
From the top menu Actions choose Instance Settings and then Get System Log. You will see a file with system log when the application was created.
You need to scroll down a bit until you reach the place showing application password. It is easy to spot as it is located in a frame.
Copy the password to the clipboard or Notepad and then open another tab on your browser. Type (or paste if you have it somewhere) the IP address of your WordPress website and add /wp-login.php. In my case the whole address is: 18.104.22.168/wp-login.php but of course the IP address of your website is different so you will have different address. Press Enter on your keyboard, you should open standard WordPress login page. Type user as username and paste the password from the System Log. Click on the Log In button. At this time you should log into your WordPress panel and can start working on the website.
That is all in this tutorial but we are not quite yet there. In the following article we will find out how to use a domain name with this new WordPress website and also how to get rid of Bitnami Info Page that is visible in the right low corner of the website. Stay tuned 🙂