How to Setup WordPress on Windows in AWS

To setup WordPress in AWS running on Windows server using Mysql database and phpMyadmin, the best way to do this is by using the AWS marketplace images that fully setup WordPress running on Windows server using MySQL DB and phpMyadmin. Links below to the AWS marketplace.

Setup WordPress on Windows 2019

 

Deploy WordPress on Windows 2019

setup wordpress on aws

Setup WordPress on Windows 2016

 

Deploy WordPress on Windows 2016

install wordpress in aws

Getting Started

 

Once you’ve deployed the WordPress server to AWS you’re ready to start using it. The below sections explain how to use and login to your new WordPress server and making any configuration changes.

 

RDP into new server

 

The following link explains how to RDP into the new instance was deployment has finished:

 

How to RDP to AWS Windows Instance

 

Login / Server Details

 

MySQL database credentials are (also used for phpMyadmin login):
MYSQL Username: root
MYSQL Password: Password is the VM Instance ID. To find the Instance ID you will find on the top right of the desktop or within the AWS console under the EC2 VM properties

 

WordPress files location:

C:\Apache24\htdocs\

 

PHP Files location:

C:\php

 

Apache location

C:\Apache24

 

PhpMyadmin location:

C:\Apache24\htdocs\phpmyadmin

 

MySQL location

C:\tools\mysql\current\

 

Setting up WordPress

 

The first step is to create a MySQL database and MySQL user account that will be used to host WordPress.

 

Launch PhpMyadmin (http://localhost/phpmyadmin)

 

Login with:

Username: root
Password: Password is the VM Instance ID. To find the Instance ID you will find on the top right of the desktop or within the AWS console under the EC2 VM properties

 

Click on the Databases Tab and enter a database name for the database you want to create and from the dropdown menu choose ‘utf8mb4_unicode_ci‘ as the DB collation as in the following screenshot:

aws wordpress

 

Once you press ‘create’ the DB is now created. Next we need to create a user account and give it privileges on the newly created DB.  Select the Privileges tab and select Add user account

 

setup AWS WordPress

 

Fill in a username and password and make sure ‘Native MySQL authentication‘ is selected under ‘Authentication Plugin’ from the drop down menu. Then select ‘Grant all privileges on database‘ and ‘Global privileges‘ Check all is selected and then press Go as per the screenshot:

 

DB-USER-Privileges

 

Next we are ready to start the WordPress setup step. Open the desktop shortcut called localhost. It points to (http://localhost)

wordpress setup

 

Choose your language and select continue.  On the welcome page continue to the database setup screen pressing ‘Lets go’ and enter the newly created database and user details:

install wordpress on aws

 

After hitting submit, on the next screen press ‘Run the installation‘.

wordpress aws setup

 

Now enter your sites title, a username and your email address and press Install WordPress

hosting wordpress in aws

 

And that should now be completed and you are now ready to use WordPress.

Access WordPress over the Internet

 

If you want to access the website externally. You will need to make sure your ec2 VM has a public IP address.

 

Within the WordPress directory (C:\Apache24\htdocs) – Open the (wp-config.php) file and add the following lines towards the top

 

define(‘WP_HOME’,’http://Public-IP’);
define(‘WP_SITEURL’,’http://Public-IP’);

 

As shown in my example

 

Then restart ‘Apache’ 

 

Also make sure any firewalls / AWS security groups have port 80/443 open to the internet.

 

If you want to access the website using a domain name, you’ll need to to configure a CName record in your public DNS to point to the public IP address of your virtual machine hosting your WordPress website.  You will be able to do this in your domain registrar where your domain name is hosted.

 

Within your domains registrar DNS settings, add new CName record

 

Under host add “@” and “www” the value it should point to the public IP address of your ec2 virtual machine where your WordPress website is hosted.

 

Depending how quickly DNS propagates accross the internet, may take a few hours, you should be able to use your domain name to access your AWSwordpress website

 

Next is to update your (wp-config.php) file with your domain name settings as we did previously, instead of public ip.

 

Within the WordPress directory (C:\Apache24\htdocs) – Open the (wp-config.php) file and add the following lines towards the top

add your domain name as per the following example:

 

define(‘WP_HOME’,’http://www.domain.com’);
define(‘WP_SITEURL’,’http://www.domain.com’);

 

 

Then restart ‘Apache’ 

 

WordPress Firewall Ports

 

The apache webserver uses the following ports:

 

TCP/80 – (http traffic)

TCP/443 – (https traffic)

 

Mysql uses the following port:

TCP/3306

 

To setup AWS firewall rules refer to – AWS Security Groups

Support

 

If you have any questions about this WordPress deployment or are experiencing any issues with your deployment leave your comments below and i will answer them for you within 24 hours.

 

If you would like to hire us to setup your WordPress server for you, get in touch and we can get you up and running 

Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud

No Comments

Post a Comment

Comment
Name
Email
Website