WordPress on Amazon EC2

Posted in Wordpress on 21 October 2019

This post has been archived

The content of this post has not been updated since 2015, and may be out of date. Extra care should be taken with any code provided.

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Within a few minutes it can be used to set-up and deploy a WordPress website.

Choose an image

This will set-up the server. When logged into Amazon Web Services navigate to EC2. Click on the Lanuch Instance button at the top of the screen.

The first step is to find the Amazon Machine Image. Search for “wordpress intuz”, and click into the “AWS Marketplace” tab on the left hand side. At, or near, the top will be the “WordPress Powered by Intuz”. Click the select button at the end of the row.

The next screen will give you indicative pricing for running your website. Click on continue.

Create an instance

The next step will allow you to choose an Instance Type. This sets the hardware capabilities of your server. For this example, and in most cases you can start by using one of the “Free tier eligible” instances. This will provide you with 750 hours of free server capabilities during the first 12 months of your AWS account.

Select one of the instances and then “Review and Launch”.

The next screen will give you an overview of your selected configuration. Click on the Launch button at the bottom of the screen.

Save a key pair

The next screen will crete a public and private key which will give you access to the server. Choose “Create a new key pair” from the drop-down. Enter the name of your website in the text box, then click to download a key pair. This will download a .pem file onto your computer. Keep this file safe, you will need it if you need to access your new server directly.

Launch Instance

Click tp Launch the instance. It will take a few minutes until they are in the running state, when they will be ready for you to use.

Elastic IP

While the instance is being built you can create a public IP address for accessing your website. Log back into AWS and navigate to EC2, you should see your new service (being set-up). On the left hand side of the screen click on the Elastic IP option.

Click on the Allocate new address button at the top of the screen. The Scope should be VPC and from the Amazon pool. You will be given the new Elastic IP address. Make a copy of this. Click Close.

Click on the new IP address and choose the Action > Associate IP Address. Set the resource type to “Instance”, from the Instance drop-down select your new server and in the Private IP drop-down choose the Instance IP address. Click on the Associate button.

Domain Name

If you have a domain name ready, you can now point the root domain, or subdomain to the Elastic IP address. This will allow you to access WordPress on yourdomain.com, otherwise you can use the IP address to access WordPress.

WordPress

Click back into your EC2 Instances. By this stage your new server should now have a status of “Running” meaning the service has completed set-up. Make a note of the Instance ID and IPv4 Public IP address.

  • Frontend: You can now access the front-end of your WordPress website by navigating http://(the domain name or the IP address)/
  • Admin Panel: Like the front-end the WordPress Admin Panel can be accessed by http://(the domain name or the IP address)/wp-admin

The username for the WordPress admin panel will be “admin” and the password will be the instance ID

Server Access

You can also access your instance via SSH using the username ‘ubuntu’ and your Amazon private key.

Related Wordpress Posts

October 2019

Setting up WordPress on Amazon Web Services (AWS) EC2

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale...

Continue reading

More Wordpress Posts