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
Table of Contents
Setting Up WordPress on Windows
Start XAMPP
After logging into the virtual machine, the first step is to configure WordPress.
- 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
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:
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
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:
Next we are ready to start the WordPress setup step. Open the desktop shortcut called localhost. It points to (http://localhost)
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:
After hitting submit, on the next screen press ‘Run the installation‘.
Now enter your sites title, a username and your email address and press Install WordPress
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
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’);
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.
Related Posts:
- Setup MySQL Server on Windows Server 2025/2022 in Azure
- How to Setup Windows Print Server on Windows Server 2016 / 2019 / 2022
- How to Setup Windows DNS Server and Configuration on Windows 2022
- Windows Server Hardening Security Checklist (Windows 2016 / 2019 / 2022)
- How to Setup FTP Server using IIS on Windows Server 2022
- How to Setup WSUS Server on Windows Server 2022