Skip to content

How to Migrate a WordPress Website from Microsoft Azure to Neurax Host

Overview

This guide explains how to migrate a WordPress website from a Microsoft Azure Virtual Machine (VM) to Neurax Host. It covers backing up website files and the WordPress database from Azure, then restoring them on Neurax Host.

Scope: These instructions apply to WordPress hosted on an Azure VM running Apache or Nginx with MySQL/MariaDB. Azure App Service and separately managed database services may require different migration steps.

Note: Neurax Host advertises free website migration assistance. Before starting the manual process, contact Neurax Host support to ask whether they can migrate your website for you.

Prerequisites

Before you begin, ensure you have:

An active Microsoft Azure account

Access to the Azure VM hosting WordPress

SSH access to the server

An active Neurax Host account with cPanel access

Access to your domain's DNS settings

A recent backup of your website files and database

Sufficient disk space to store the backup files

Phase 1: Export Website from Azure

Step 1: Connect to the Azure Virtual Machine

Log in to the Azure Portal.

Navigate to Virtual Machines.

Select the VM hosting your WordPress website.

Connect using SSH.

Example:

ssh username@server-ip

Replace username and server-ip with your actual SSH username and server IP address.

Expected outcome: You are logged in to the Azure server.

Step 2: Locate the WordPress Installation

Common WordPress locations include:

/var/www/html

/var/www/wordpress

However, the actual installation directory depends on your server configuration.

Navigate to the correct directory and verify that it contains WordPress files such as:

wp-admin

wp-content

wp-includes

wp-config.php

index.php

Expected outcome: The correct WordPress installation directory is identified.

Step 3: Create a Website Backup

Move to the parent directory of your WordPress installation so that the backup archive is created outside the website directory.

For example, if WordPress is installed in /var/www/html, run:

cd /var/www zip -r backup.zip html

This creates /var/www/backup.zip and avoids including the archive itself in the backup.

Replace the example directory with the actual location of your WordPress installation. Ensure hidden files, including .htaccess where applicable, are included.

Expected outcome: A ZIP archive containing the website files is created outside the WordPress directory.

Step 4: Download Website Files

From your local computer, run the SCP command using the actual path to the backup archive:

scp username@server-ip:/var/www/backup.zip .

Replace the example username, server IP, and file path with your actual details.

The final . saves the downloaded archive to your current local directory.

Expected outcome: The website backup is downloaded to your computer.

Step 5: Export the WordPress Database

Locate the database configuration in the WordPress installation's wp-config.php.

Identify the database name, username, host, and other required connection details.

Export the database using the appropriate command for your database setup.

For a database accessible through the VM's local MySQL/MariaDB service, an example is:

mysqldump -u DB_USER -p DB_NAME > /var/www/database.sql

Replace DB_USER and DB_NAME with the actual database username and name.

If the database is hosted separately, such as Azure Database for MySQL, use its actual hostname, port, credentials, SSL requirements, and access permissions. The connection command may need additional options.

Expected outcome: A database backup named database.sql is created at the specified path.

Step 6: Download the Database Backup

From your local computer, download the SQL file using the same path specified in Step 5:

scp username@server-ip:/var/www/database.sql .

Replace the example values with your actual SSH username, server IP, and SQL file path.

If the database is hosted separately and the SQL file was exported from another environment, download the exported file from its actual saved location instead.

Expected outcome: The database backup is saved on your computer.

Step 7: Verify Downloaded Files

Ensure you have both files:

backup.zip

database.sql

Keep these files safe until the migration is complete and verified.

Expected outcome: The website files and database backup are ready for import.

Phase 2: Import Website into Neurax Host

Step 8: Log in to Neurax Host cPanel

Log in to your Neurax Host account.

Open cPanel.

Expected outcome: The cPanel dashboard opens.

Step 9: Locate the Website Document Root

Open Domains in cPanel, if available.

Check the document root assigned to your domain.

Open that directory in File Manager.

Do not assume the correct directory is always public_html. Use the actual document root assigned to your domain.

Expected outcome: You have opened the correct destination directory for your website.

Step 10: Upload Website Files

Open File Manager.

Navigate to the correct document root.

Click Upload.

Upload backup.zip.

Wait for the upload to finish.

Expected outcome: The ZIP archive appears in the destination directory.

Step 11: Extract Website Files

Select backup.zip.

Click Extract.

Extract the files into the correct document root.

Verify that wp-admin, wp-content, wp-includes, wp-config.php, and index.php are directly inside the intended WordPress directory, not inside an unintended nested folder.

Expected outcome: The WordPress files are restored in the correct location.

Step 12: Create a Database

Open MySQL Databases in cPanel, if available.

Create a new database.

Record the full database name.

Expected outcome: A new database is created.

Step 13: Create a Database User

Create a new MySQL database user.

Generate a strong password.

Save the username and password securely.

Expected outcome: A database user is created.

Step 14: Assign the User to the Database

Add the new user to the new database.

Grant the required privileges, typically ALL PRIVILEGES for a standard cPanel WordPress setup.

Save the changes.

Expected outcome: The database user has the required access to the destination database.

Step 15: Import the Database

Open phpMyAdmin.

Select the new database.

Click Import.

Upload database.sql.

Click Go.

Expected outcome: The database imports successfully without errors.

Step 16: Update WordPress Configuration

Open wp-config.php in the WordPress destination directory and update the database settings using the actual credentials provided by Neurax Host.

Example:

define('DB_NAME', 'your_database_name'); define('DB_USER', 'your_database_user'); define('DB_PASSWORD', 'your_database_password'); define('DB_HOST', 'your_database_host');

Replace all example values with the correct details. Do not assume DB_HOST is localhost; confirm the database host with Neurax Host.

Save the file.

Expected outcome: WordPress is configured to connect to the destination database.

Step 17: Verify Domain and WordPress URL Settings

Confirm that the domain is assigned to the correct document root in cPanel.

Verify that the WordPress site URL and home URL match the intended domain.

If the domain is changing, check whether URLs stored in the database need updating. Use a WordPress-aware search-and-replace method to avoid damaging serialized data.

Do not change the live domain's DNS until the destination site has been checked as far as possible.

Expected outcome: The domain and WordPress configuration are ready for testing and DNS changes.

Step 18: Update DNS When Ready

After testing the destination website as far as possible, update DNS if the domain still points to Azure.

Choose the method appropriate for your setup:

Nameservers: Change the domain's nameservers to those provided by Neurax Host.

A record: Point the domain's A record to the correct Neurax Host server IP.

These are alternative approaches; you do not normally need to change both.

If changing nameservers, recreate any required DNS records at the new DNS provider, including MX records and applicable SPF, DKIM, and other email records. This helps prevent email delivery problems.

DNS propagation time varies and is not guaranteed to finish within 48 hours.

Keep the Azure website available during the transition and verify the domain's resolution before retiring the original hosting environment.

Expected outcome: The domain begins resolving to Neurax Host as DNS changes take effect.

Step 19: Enable SSL and HTTPS

Open SSL/TLS Status in cPanel, if available.

Run AutoSSL if supported and needed.

Confirm that the SSL certificate has been issued and is active for the domain.

Open the website over HTTPS and check for certificate errors.

Enable Force HTTPS Redirect only after HTTPS works correctly.

Expected outcome: The website loads securely over HTTPS.

Step 20: Test the Website

Before declaring the migration complete, verify the following:

The homepage and important pages load correctly.

Images and media display properly.

Menus, forms, plugins, and other interactive features work.

WordPress Admin is accessible at https://yourdomain.com/wp-admin.

The website connects to the destination database without errors.

WordPress URLs and important links are correct.

HTTPS works without certificate warnings.

Email delivery works, if your domain uses email.

Permalinks work correctly.

If needed, open Settings → Permalinks in WordPress Admin and click Save Changes to refresh permalink rules.

Expected outcome: The migrated website passes the required functionality checks.

Migration Complete

The migration is complete only after the website, database connection, WordPress Admin, HTTPS, and essential functionality have been tested successfully.

Keep the Azure VM and any required database services running until the migrated website has been verified and DNS is resolving correctly. Once you have confirmed that the new site is working and the old environment is no longer needed, you can plan to retire the Azure resources.

After confirming that the temporary archive is no longer needed on the Neurax Host server, delete it to free up storage space.

If you encounter issues, contact Neurax Host support for assistance.

FAQs

Can I migrate directly from Azure App Service?

Yes, but the process differs from migrating a WordPress website hosted on an Azure VM. App Service uses its own deployment and file-management model, and its database may be hosted separately. Follow the migration procedure appropriate for your App Service configuration and database service.

Will migration affect my Azure website?

Copying the website files and exporting the database do not normally require shutting down the original website. However, DNS changes, database updates, or configuration changes can affect the live site. Keep the original website running during migration, avoid unnecessary changes to the source, and verify the destination before switching DNS.

Do I need SSH access?

SSH access is generally required for the manual command-line process described in this guide for Azure VMs. Other migration methods may be available depending on your Azure configuration and access permissions.

Troubleshooting

Error Establishing Database Connection

Verify the database name, username, password, host, and user permissions in wp-config.php. Confirm that the database service is reachable from Neurax Host.

Website Displays 404 Errors

Check the document root and rewrite configuration. In WordPress Admin, open Settings → Permalinks and click Save Changes if necessary.

Images Are Missing

Verify that wp-content/uploads and other required media files were migrated successfully and that their file permissions are appropriate.

DNS Changes Not Working

Check the domain's nameservers and DNS records. DNS propagation time varies, so do not assume the change will complete within a fixed 48-hour period.

SSL Certificate Errors

Confirm that the domain points to the correct server and that the SSL certificate is active. Enable Force HTTPS Redirect only after the certificate works correctly.

Need more help?

Our AI is available 24/7, or get in touch with a human.