Use MySQL Database on Azure to configure WordPress

WordPress is a very widely used content management system.This article explains how to use MySQL Database on Azure and Azure Web Apps to install and configure WordPress.

Step 1: Download the latest version of the WordPress installation package

Download the latest version of the installation package to your local storage directory from the WordPress Web Apps. You can then extract it to this directory.

Step 2: Create a MySQL database instance on the Azure server

Use the Azure portal to create your MySQL server. You can also create the first database for the server during the creation process.

Create MySQL server


Ensure that you have selected Allow Azure Services to access the server. Otherwise, the deployment might fail.

Step 3: Create a new web app

  1. Sign in to the Azure Management Portal. Select New from the menu in the lower-left corner.

  2. Select Web + Mobile > Web App > Create, enter the App Name and Resource Group, and then create or select the App Service Plan/Location.


  3. Select Create, and wait for Azure to complete the operation.

Deploy the WordPress installation files

Deploy all the WordPress installation files that you uncompressed in Step 1 to the new web app. We recommend that you now use Git to complete the deployment process. For the specific method, see Publishing to Azure web apps from source control.


Step 3 is primarily for new users of WordPress.

If you have used Azure Web Apps and have successfully deployed the WordPress installation file and started to use it, maintain content consistency by exporting the data and reinstalling and deploying WordPress.

After WordPress has successfully connected with the new MySQL database instance, import the data. Complete the WordPress data import and export procedures by using the WordPress control panel, as shown in the following image:

Import and export with WordPress

Step 4: Install and configure WordPress

Access and deploy the web app

To access the web app that you created earlier, go to the WordPress configuration page and select the required language. The content appears as in the following image:

Configure WordPress

Connect and configure the MySQL database instance

  1. Enter the configuration details for the database that you created in Step 2 into the interface, as shown in the following image:

    Connect to WordPress

    If you see what appears in the following image, WordPress is now connected to MySQL:

    Successfully connect to WordPress

  2. Click to proceed with the installation, and finish deploying WordPress.

Step 5: Use WordPress

After you have completed the preceding process, if you access the web app that you created earlier, you will find that the main WordPress interface now works. You are ready to start using WordPress.

Install WordPress