WordPress on AWS, Getting Started

This article is an overview, with step by step instructions, of getting started on Amazon Web Services (AWS) and using WordPress to host a website there. This article is not intended for those that are already competent in both WordPress and AWS. If either of these is new to you this article should be helpful. AWS is much broader set of services than just website hosting.  I am only addressing the specific use of Amazon’s service to host a WordPress based website in this article. Also, I am trying to keep these article down to 1200-1500 words.  I failed with this one. For that reason I have broken some of the information out into future articles.  I will get them out as quickly as possible.

Why AWS and WordPress:

While relearning how to build a website I have decided that, in my opinion, WordPress is a very good platform and tool-set for website building. Reasons for this opinion include flexibility, portability and the availability of a rich set of community resources.

The details supporting these opinions are far to vast to address here.  If you are interested please refer to several past blogs:

Scope and Other Requirements:

There are a couple of topics that will need to wait for the next few blogs.  As you complete your first WordPress installation you will soon need to learn more about  the following:

  • Email setup (AWS-SES is a good solution)
  • Actual use of WordPress
  • Domain and routing stuff,  Route53 (This is how your site is reached using your domain name)
  • Using Putty and WinSCP to access Linux and phpmyadmin

Please look for my next few blogs to see details on each of these.

Steps to get Started:

Create an AWS account:

If you do not already have an Amazon AWS account then follow these steps to create one. Be very careful to capture, store and protect the credentials you create along the way. You can begin with either a personal or company account.  The Website is very movable later.

  1. Access the web page aws.amazon.com.
  2. If there is not a “create a new account” button obvious then select “MyAccount” from the top menu.
  3. As the drop down menu appears, select AWS Management Console.
  4. A sign-in page will appear. Below the sign-in form is a button “Create a new AWS account”.  Click on it.
  5. You will be asked for an email address.  This will be a root part of your identity.  Use one that you want to receive AWS information, billing and authentication on.  You will be asked for a password and a name for your account.  Remember these.  They  can be changed later. After filling in these items click on continue.
  6. You will be presented with a dialog to enter all of your personal information.  In most cases I would recommend making an account for yourself  (as opposed to starting with a company one.  Fill it in carefully and read the terms and conditions well enough that you can agree to them.  Check that box and click on continue.
  7. At this point you will need to enter payment information and go through Amazon’s current call back mechanism using cell and or email.
  8. You will need to select a support plan.  Select “Basic” to start. (no cost)
  9. At this point you will have generated no charges or ongoing costs.  After this, many services you might sign up for do cost money.  I will be pointing out free services in this article (except route53).  Unless you add other services, or continue after the free period (often 1 year!) you should see less than 52 cents billing per month.

You should now have a working AWS account.  Practice logging out and then back in. To visit this account, always start at aws.amazon.com.  You are now ready to create your first instance.

Make a couple of decisions and learn about instances:

AWS offers many types of services.  The most basic building blocks are items that either hold data or can execute software.   A few of these services are:

  • S3            — Data storage Containers
  • EC2          –Compute instances
  • Lightsail  –Small compute instance package
  • Lambda  — dynamic lightweight compute facility
  • Route 53—Domain Name Services  (DNS) etc

You will also need to make a couple of decisions:

  1. Single or Multiple Site WordPress installation?
  2. LightSail or EC2
  3. Email strategy

I strongly recommend using Single site WordPress.  This will make moving the website much easier.  You may need to study SQL databases more in order to learn to work effectively with WordPress Multisite.  I also like to start with EC2 as it is free for one year.  Lightsail might be less expensive after the first year.  If so create that instance then and move your site.

Email may be the toughest choice.  I like AWS  SES for this but it is harder to completely implement than other choices. Many features that you are likely to want in your WordPress site will require the ability for WordPress, on the server, to send email.  With today’s source identification systems present in email, it is more trouble-free and more secure to leave this all inside of Amazon.

Create an instance:

Now that you have an AWS account sign into it. Upon completion of sign-in you will be presented with the AWS Management Console. From the left portion of the black toolbar at the top, click on “Services”. In the upper left portion, “Compute”, click on EC2. This is the EC2 dashboard where you will manage your EC2 compute instances.  The following steps will help you create an instance and populate it with a software stack which includes Linux, Apache, PHP and WordPress.  This stack actually comes from Bitnami.

  • Click on the “Launch Instance” button.  (If it is not there select “Instances” and then “Launch Instance”
  • At “Step 1: Choses an Amazon Machine Image (AMI)”  Select AWS Marketplace.
  • The first item should be “WordPress Certified By Bitnami and Automatic”  Select this.
  • Note the instance types.  We will be using t2-micro.  Click on Continue
  • On “Step2: Chose an Instance Type”  select t2.micro  (free tier) and click on “Review and Launch”
  • Click on “Launch”

IMPORTANT-  The next screen is where you deal with your root keys.  If you are new to AWS click on “Chose an existing keypair” drop-down and then select “Create a New Key Pair”. Be sure to download this file and keep it safe.

AWS screen to select or generate a root key pair

Once you have downloaded your file click on “Launch Instance”. Your instance will now launch.

From the menu at the left select Instances. In the table showing your new instance select the instance.  Above the table select the “Actions” drop-down and then select “Image Settings” and then “System Log”  Scroll down to nearly the bottom of log and find the “application password“.  Carefully record this password.  The user name will be “user”

System log file display with Initial WordPress Credentials

Close the system log and record the IP address of the instance (IPv4 Public IP). 

In a new tab of your browser type “http://ipaddressabove/wp-admin.

Enter “user” for the user name and the application password you recorded above.

Congratulations!   You have just launched WordPress on AWS.

You can access it with the public IP from above.  You can also point to this IP with a domain name you purchase or already have.

At this point you can either create a website from scratch or load a WordPress based website from somewhere else.

Using WordPress

Build a simple Site (if this is your first WordPress experience:

If you already have a WordPress site, import that now and skip the rest of this article.  You are ready to rock and roll.  If you are new to WordPress, follow these few steps to create your first WP site! When you log into WordPress the first time the screen should look like this:

  1. Install a theme.  I suggest either Olsen-Light or Astra.  You can always change this later.  Select “Appearance” from the left menu and then select themes. To try Olsen-Lite click the Add button near the top and type Olsen in the search box at the right. On the Olsen-Light selection click on “install”. When that completes click on “activate”. You can change themes to see how they look and operate. Be careful not to use advanced theme based editors unless you are sure you want to proceed with them. They often create code that won’t function in other themes.
  2. Select “Pages” from the left hand menu and then select Sample Page.  Click on edit.
  3. Customize this page a little. Maybe change some text and alter the block type from paragraph to title (“T”).
  4. Press Publish.  You have created your first page. Click View.
  5. To change the title bar area click on edit page, then appearance , then customize.
  6. Change some things in “Site Identity” and see how they affect your page.
  7. Congratulations! You have now started your first website using WordPress.


More In Depth WordPress learning:

This article just begins to touch on WordPress operation and the specifics of working with WP over AWS. Please watch for future blogs on WordPress and on other tools and procedures you will need.  It will be very important to learn to access the “backend” of this software stack. There you can type specific Linux shell commands and transfer files using a SFTP program.  I use WinSCP and Putty for these purposes.  Before you make anything public, you will need to remove the BitNami banner from the bottom right corner of your pages. This is one example where you will need to make an Secure Shell (SSH) connection to your AWS EC2 instance and work directly with Linux.  You will need to have the key pair file (xxx.pem) that you downloaded during the EC2 launch process (or one you used that was saved from prior AWS work).  The BitNami software stack already contains the “phpmyadmin” tools.  To access these tools you must first create a secure connection (I use Putty) and then make an http connection via localhost.  This level of securing your server is good!  Again I will detail this in another article shortly.

Please comment on this BLOG article.  Negative comments are also appreciated.

Thanks, Larry

1 thought on “WordPress on AWS, Getting Started”

Leave a Comment

Your email address will not be published. Required fields are marked *