WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

How to Migrate Your WordPress Website to Azure: Step-by-Step Guide

Last Updated on September 4th, 2023


We recently looked at Microsoft’s cloud service Azure where we gave an introduction to the service, and how to setup a fresh WordPress installation. Today, we are going to will look at how to move an existing WordPress website to the Azure platform.

The steps covered will be how to backup your existing WordPress installation, move your site content and WordPress files over to Azure, and process to set up your permalinks, so they are the same.

We’ll also show you how to deploy a WordPress website with the Azure virtual machine. 

Preparing to Migrate a WordPress Site to Microsoft Azure  

The first step is creating an account on the Azure Cloud Service. The PaaS offers a variety of subscription options suitable for websites of all sizes.

All plans deliver a high level of control and provide plenty of room for a site to grow. In addition, they improve the site’s overall performance, and support integrations with other Microsoft services.  

Once you set up an Azure account, you’ll have to decide which method you will use to migrate your WordPress website to Azure. The manual migration process involves using FTP software. If this option is too complex, you can create a virtual machine from your Azure account. 

Let’s first look at what you need to do to migrate WordPress to Azure with FTP software.

microsoft’s azure cloud service - migrate wordpress to azure

Signup for an Azure Account »

In partnership with Microsoft

Article Continues Below

Backup your WordPress Site with cPanel

The first step towards WordPress Azure migration is to ensure you have a complete and current backup of your site. In case, anything should go wrong, you will be moving the freshest version of your site, so no content, comments, or other data gets lost in the move. There are several ways to achieve this; if you are currently using cPanel on your current host, this is really easy to accomplish. Simply log in to your cPanel, choose the “Backup Wizard” link, and then choose the “Backup” option:

backup wordpress site with cpanel

Choose the “Full Backup” option, which will include all your files and databases:

backup wordpress site with cpanel step 2

Finally, enter your email address, and click the “Generate Backup” link,” and you will receive an email once the backup has completed.

backup wordpress site with cpanel full backup

Backup your WordPress Site with a Plugin

If you do not use cPanel hosting, your host may have a different procedure for generating backups. For a method that will work with any host, you can use the plugin BackupWordPress, which is free to download.

Install and activate the plugin, and you will see a new menu item under “Tools” named “Backups,” click the “Settings” link and choose the “Database and Files” option.

backup wordpress site with a plugin

Now, you can click “Run Now” to create a backup of your site; once it has finished running ( the amount of time will depend on the size of your database and site content ), you can then download the backup as a zip file.

Article Continues Below

manage backup of wordpress site with a plugin

Export Your Site Content

Now, you have your site files. Then, you will need a copy of your site content; WordPress has a built-in exporter for this – simply visit “Tools” > “Export,” choose “All Content,” and download the Export file.

export content of wordpress site with a plugin

Move WordPress Content to Azure

Now you have your site backup, the content you will need to set the site up on Azure is as follows:

  • The /wp-content folder – This contains any uploaded images and files, your plugins and your themes
  • The Export file – This contains all your blog posts, comments, pages and any other content.

In our previous post, we showed you how to install WordPress on Azure, so you should ensure you have done that correctly, and have a functioning WordPress installation before proceeding. In this step, we will be uploading our wp-content folder via FTP, and importing the database.

Upload Content Via FTP

Login to the Azure portal, and choose your website from the “Websites” link on the left-hand side; click your site name and the “Dashboard,” and you will see a link on the bottom right named “Setup Deployment Credentials”:

upload content via ftp in wordpress site

Enter a username and password in the popup box, and these will be your FTP login credentials ( you can also use these with GIT if you prefer to deploy that way ).

ftp login credentials

Scroll down, and you will see the FTP hostname to use. We entered the username as “wplift,” but when logging in via FTP, we have to enter it as follows: wplift\wplift, along with the password you chose. You can then log in with any FTP program, such as Filezilla, navigate to site/wwwroot/, and upload your wp-content folder.

Article Continues Below

Import Content

To import your content, in the new Azure installation, visit “Tools” > “Import” and select the WordPress importer from the list:

import content with wordpress importer

This will bring up the WordPress importer plugin; click “Install”, and then activate the plugin.

wordpress importer plugin

You can then upload the XML file you exported from your original site:

import wordpress

Make sure you tick the “Download and import file attachments” box, as this will grab all the images from your old site.

Once this has finished, you can activate your original theme and plugins, and you should have a complete copy of your old site running in Microsoft Azure!


To make sure there are no 404 page not found errors, you should set your permalinks up the same as the previous site. To do this, visit “Settings” > “Permalinks”, and set your options and configs there. For instance, choose “Post Name” and WordPress will create a “web.config” file for you ( on PHP hosting, the file is .htaccess ), and will contain the following:

[php]<?xml version="1.0" encoding="UTF-8"?>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
<action type="Rewrite" url="index.php"/>

Following these steps, you will see it’s actually effortless to move an Azure WordPress hosting from its native environment to another (Azure, that is) – taking a full site backup is essential, or else you might run into any problems along the way. Using the WordPress Import / Export tool helps significantly with this, and FTP was nice and simple to setup using the Azure interface.

Using VM to Deploy and Import WordPress to Azure 

Each of Azure’s plans comes with a different configuration allowing you to choose the best option for your site’s CPU or disk operations usage. 

The Azure account gives you access to a virtual machine you can customize to meet your site’s requirements. 

Step 1 – Setting up a Virtual Machine 

You can launch a Virtual Machine (VM) by clicking the New button in Azure’s side toolbar, and searching for the WordPress instance. The platform lets you adjust the VM’s settings before deploying it so that you can choose its name, disk image location, size, & CPU and memory values. 

Afterward, you should click the Create button, download the private key and create a resource. 

Step 2 – Domain Configuration 

Go to your current hosting service, and check your account’s DNS settings. Make sure this option is activated, and create the DNS record using the WordPress instance link you generated with Azure VM. 

You can find the site’s public IP address in Azure’s dashboard. Afterward, you should install the WordPress Migration plugin on the site’s original version and the copy you created with Azure VM. 

Use the plugin to export the site, then go to your Azure account, and use the same plugin to import that file. 

Step 3 – Migrating to the WordPress Instance

Install a terminal emulator on your computer if you don’t have one. Use it to replace the site’s original version with the WordPress instance you created with Azure.

Go to the emulator’s Downloads folder, find the pem file, and use the chmod 600 wordopress-website _key _pem command to update the permission level. Replace the instance’s IP with the external IP within the same file, and then execute the SSL script.

Use your default WordPress login credentials to access your site’s new instance. Also, it’s advisable to change the site’s permalink structure after migration, but this step isn’t mandatory. 

Frequently Asked Questions about Moving WordPress Websites to Azure

Why Migrate to the Azure Cloud?

Scalability is the most common reason to migrate to the Azure cloud. The platform automatically adjusts to increased workloads to accommodate the traffic increase. 

Azure allows site owners to configure their hosting settings according to their needs, preventing performance bottlenecks. Site owners can monitor the site’s metrics, such as CPU or Network usage, so that they can quickly detect issues affecting their site’s performance

The platform supports native integrations with Microsoft apps that make managing a website easier. However, this hosting service isn’t ideal for beginners relying extensively on customer support.  

How to Migrate a Website to Microsoft Azure?

For WordPress Azure Migration, you can utilize a virtual machine, or through the FTP software. Both methods are time-consuming, and require technical knowledge and previous experience.

You’ll need an active Azure account with the plan that provides the infrastructure your website needs to run smoothly. 

The quickest way to migrate a WP site to Microsoft Azure is to create a virtual machine, and move the site to a new hosting service. 

Alternatively, you can use a plugin to export a site, and an FTP software to upload the file to the Azure platform.

Is WordPress on Azure Free? 

Although some Azure services are free, you’ll have to cover the costs of moving a WordPress site to this platform. You can choose from a broad range of instances with one or more cores, different storage space options, or RAM sizes. 

The platform offers hourly and monthly pay-as-you-go pricing models, and you’ll only have to pay for what you use. The AO instance is the least expensive option, but it includes a single core, 0.75 GB of RAM, and 20GB of storage space. 

Final Thoughts 

In theory, WordPress Azure migration isn’t overly complicated, but you shouldn’t go through this process alone if you don’t have the necessary technical knowledge. 

Using the Azure Cloud Service as a website host can be an affordable solution for websites with vast databases that need a considerable performance boost. 

Which method of moving a WordPress website to Azure do you like the most? Let us know in the comments below! 

Signup for an Azure Account »

A team of WordPress experts that love to test out new WordPress related software, WordPress plugins and WordPress themes.