This page describes how to set up a WordPress blogging site, residing on AWS. Many years ago, I wrote a similar article on how to set up a WordPress site on HerokuThis time around, I decided to go with AWS EC2 as opposed with Heroku. Heroku has a great development set up, but I found the file system a bit restrictive to get some of the options working within WordPress. If you have basic unix skills, EC2 has more flexibility as it allows administatrative control over your instance and site.

You don’t need to do this, but I first installed everything on my local computer before pushing to EC2. I’m using macOS Sierra 10.12.1. You can jump to Step 4 – Configure Amazon EC2.

1. Install homebrew, apache, php using brew. Follow this article.

2. Install mysql

Log into mysql to create a database and specify root at user.

3. Install wordpress

3A. Install MySQL workbench. If needed, install MySQL workbench in order to modify SQL servers.

To install mysql-utilities which work with mysqlworkbench

Download  Platform Independent version, and install MySQL Utilities

4. Configure Amazon EC2

Read this article first, and follow steps 1-3. 

Step 1. Create an AWS account here.

Step 2. Create an EC2 instance. Don’t forget to create an elastic URL.

Step 3. SSH into instance.

The next steps 4 & 5, differ from the article. 

Step 4: Install Apache.

For all the bells and whistles of WordPress 4.7, you’ll need the version 2.4.

Double check your AWS instance, using your assigned public DNS name (elastic URL). If you get a message permission denied, then go to the AWS Console and setup, under NETWORK & SECURITY, make sure your security group has the following info:

To make things easier, you can update httpd.conf to change the DocumentRoot so that you can work from your /home/ec2-user/Sites folder.

Step 5: Install PHP5.6 or later

Step 6: Install MySQL

For step 6, follow the article verbatim.

Step 7: Install WordPress.

This will uncompress WordPress in its own “wordpress” directory.

Next create the WordPress wp-config.php file:

Make appropriate changes on username, database, and password. Then open the broswer to test.

In addition, if you use composer, you’ll need to do the following.

Then you can run

Update your .htaccess in your app root.

Best wishes and happy hacking!