How to Setup WordPress on Windows Server 2025 or 2022 in Azure

The easiest and quickest way to setup and install WordPress on Windows in Azure is to use our marketplace listings.  Our public virtual machine will setup WordPress on Windows Server into your Azure tenant. Host as many websites and MySQL databases as you need. Also comes pre installed with XAMPP, Apache, phpMyadmin, MySQL, PHP and optional FileZilla FTP Server.

WordPress on Windows in Azure

WordPress on Windows Server 2025 Azure

Click to deploy WordPress on Windows Server 2025 into your Azure tenant

install wordpress server Azure

WordPress on Windows Server 2022 Azure

Click to deploy WordPress on Windows Server 2022 into your Azure tenant

install wordpress on azure

Table of Contents

Setting Up WordPress on Windows

Start XAMPP

After logging into the virtual machine, the first step is to configure WordPress.

 

  1. Open up the desktop shortcut called (localhost).

 

2.Follow the onscreen setup instructions to configure how you would like WordPress configured.

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

WordPress Windows

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:

Azure 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 Azure 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 Azure Windows VM

 

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

 

wordpress azure setup

 

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

 

hosting wordpress in azure

 

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

Connecting to your WordPress website externally

If you want to access the website externally. You will need to make sure your Azure 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 azure

 

Then restart ‘Apache’ – via XAMPP Control Panel.

 

Also make sure any firewalls / Azure network 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 Azure virtual machine where your WordPress website is hosted.

 

Depending how quickly DNS propagates across the internet, may take a few hours, you should be able to use your domain name to access your Azure WordPress 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.

To manage your WordPress Users, try our WordPress Single Sign On plugin, allowing you to manage your WordPress user access, role mappings, sync user attributes from your identity provider and secure logins.

WordPress Firewall Ports

You will need to make sure you have the following firewall ports configured. As part of this Azure marketplace solution they are automatically configured via an NSG, but if you need to manually configure them on other firewall appliances, they are:

 

  • http – 80 
  • https – 443
  • Mysql – 3306 (optional, no need to expose this externally).

 

To setup Azure firewall rules refer to – Azure Network Security Groups

WordPress Server Support

If you have any questions about the setup of WordPress in Azure using our WordPress Windows server images leave your comments below and we will reply within 24 hours.

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.

3.5 2 votes
Article Rating
Subscribe
Notify of
0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x