How to Setup WordPress on Windows Server in AWS (2 Click AWS WordPress Hosting)

Setup and install WordPress in AWS running on a Windows EC2 server using Mysql database, IIS and phpMyadmin, the best way to do this is by using the AWS marketplace images that will allow you to setup WordPress running on Windows server using MySQL DB and phpMyadmin. Easy way to host WordPress on AWS, Perfect for AWS WordPress hosting running on your own managed EC2 instance. Links below to the AWS marketplace. 

AWS WordPress on Windows Server

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

aws wordpress

Getting Started with WordPress on Windows Server in AWS

Connect via RDP

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

 

How to RDP to AWS Windows Instance

Start XAMPP

This solution uses XAMPP, making it easier to manage Apache, MySQL and FTP.  Right click on XAMPP Control Panel on the desktop and choose Run as Administrator.

 

Once opened, click on start Apache and start MySQL

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


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 hosting

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:

wordpress for windows server

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

wordpress on windows

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 EC2

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:\xampp\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

host wordpress on aws

Then restart ‘Apache’ – via XAMPP Control Panel.

 

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:\xampp\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’);

how to install wordpress server

 

Then restart ‘Apache’ – via XAMPP Control Panel.

WordPress Firewall Ports

 

The IIS 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 installing WordPress on Windows Server on AWS 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 

 

Avatar for Andrew Fitzgerald
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.

5 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x