How to Migrate WordPress to Azure
Interested in hosting WordPress on Azure?
In this tutorial you will learn how to install WordPress on Microsoft Azure using the Bitnami version of WordPress on Azure.
This tutorial covers all the components necessary to migrate a WordPress website to Azure, including how to install WordPress on an Azure Virtual Machine, how to configure your domain name on Azure DNS, and how to transfer an exact copy of your existing WordPress website to Azure.
Running WordPress in a virtual machine on Microsoft’s Azure Cloud Platform allows you to harness the full power of the cloud, and take your WordPress website to the next level.
Is Azure right for you?
If all you’re looking to do is host a simple WordPress website, then Azure is not the best option for you; managed hosting providers are cheaper and easier to use. There are even managed cloud hosting providers such as Bluehost Cloud (view tutorial).
The main reason why you should host WordPress on Azure is because you’re developing a website that you predict will grow in size and complexity over time, and you require a platform built with the infrastructure that your website will require as it grows.
To get started, follow along with the video above. If you get stuck, check below to see the steps listed individually with their commands.
There are 3 parts in this tutorial:
-
PART 1: Deploy WordPress Installation
-
PART 2: Transfer Domain Name
-
PART 3: Import WordPress Website
PART 1: Deploy WordPress Installation
The first step in this tutorial to migrate WordPress to Azure is to install WordPress on an Azure virtual machine (VM) using a WordPress stack configured by Bitnami.
By default, WordPress is built on a software “stack” consisting of WordPress, Linux, Apache, MySQL, and PHP – meaning that you need to install each of these components to your Azure virtual machine in order to run WordPress.
Sounds time consuming, right?
The good news is that companies such as Bitnami have already configured and bundled these “stacks” for you. All you need to do is install them to your EC2 virtual Machine.
So let’s get started.
1. Launch VM Instance

2. Configure WordPress Installation

2.1 Basic Settings

2.2 Hardware Settings

2.3 Network Settings

2.4 Finalize Deployment

3. Login to WordPress

3.1 Retrieve Login Credentials


3.2 Access WordPress Dashboard




PART 2: Transfer Domain Name
Great job! You’ve just installed WordPress on an Azure virtual machine!
The next step in this tutorial to migrate WordPress to Azure is to transfer your domain name to Azure so that it links to your website.
Taking the time to properly configure a domain name for your website is an easy way to prevent search engine indexing issues from occurring.
By default, your public IP address will be used as the domain for your website. However, using a public IP address as your primary domain is bad for your website’s SEO.
In this next section you will learn how assign a custom domain name such as yourwebsite.com to your WordPress installation on Azure.
So let’s get started.
1. Copy Virtual Machine IP


2. Create a DNS Zone



3. Add “A” Record


4. Add “CNAME” Record


5. Review Record Set

6. Edit Domain Name Servers


7. Test Settings

Optional Configurations
How to Include WWW. Prefix
By default, your domain will show without the www. prefix.
If you would rather your domain show up as www.example.com instead of just example.com, then read on for configuration instructions.
NOTE: The instructions below are intended for users running Bitnami’s WordPress stack on Azure. If you’re using a different Apache configuration, remember to substitute the bitnami.conf file with your server’s htaccess equivalent.




sudo nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

sudo /opt/bitnami/ctlscript.sh restart apache
PART 3: Import WordPress Website
Great job! You’ve just assigned a custom domain name to your new WordPress installation!
Using a WordPress Migration plugin is a great time saver when transferring a WordPress website between hosting providers.
The next step in this tutorial to migrate WordPress to Azure is to transfer an exact copy of your existing WordPress website to your new WordPress installation on Azure.
In this tutorial, you will use the All-in-One WP Migration Plugin to quickly transfer a copy of our existing WordPress website to our new WordPress installation on Azure.
1. Download WP Migration Plugin

2. Export Website File

3. Import Website File

NOTE: By default, the All-in-One WP Migration plugin only allows a maximum file upload size of 512MB. If you need to increase the maximum file upload size to 10GB+, check out this tutorial.
4. Change Permalink Structure

NOTE: After finishing with the WordPress migration, you can uninstall or deactivate the All-in-One WP Migration plugin.
Did it work?
That’s it! You’ve successfully migrated your WordPress website to Azure, including installing WordPress, configuring a custom domain name, and transferring an exact copy of your existing WordPress website to Azure.
If you have general questions or comments about this tutorial, please post them below.
If you benefited from this tutorial, and would like to support my work, please like my Facebook page and subscribe to my YouTube channel.
Thanks,