Use MySQL Database on Azure to configure WordPress websites

WordPress is a very widely used CMS. 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 official WordPress website. You can then extract it to this directory.

Step 2: Create a MySQL Database on the Azure server

Use the Azure portal to create your MySQL server.

Creating MySQL Servers

Ensure that the allowed services are already set to “Yes” in your “configuration”; otherwise, this may cause the deployment to fail. The image below shows that allowed services are set to “Yes” by default.

Allowed Services

Create a new MySQL database for WordPress to use (essential)

Switch the workspace to “database,” and click “Create” at the bottom of the screen to create the new database.

Creating New Databases


Users must manually create the MySQL database in the Azure portal. The WordPress deployment will fail if you miss this step.**

Step 3: Create a new web app

3.1 Logon Azure Managemet Portal, and click "CREATE" button in the bottom left.

3.2 Click "COMPUTE > WEB APP > QUICK CREATE", then enter URL.

3.3 Click "CREATE WEB APP", and wait for Azure to finish the tasks.

Creating New Web Apps

Deploy the WordPress installation files

Next, deploy all the WordPress installation files you uncompressed in Step 1 to the new web app. At this point, we recommend that you use Git to complete the deployment process. Refer to Publishing to Azure websites from source control for the specific method.


Step 3 is chiefly intended for new WordPress users. Some of you have already used Azure Web Apps and successfully deployed the WordPress installation files and begun using them. To keep the content consistent, we recommend that you export the data and then reimport it after you reinstall and deploy WordPress and successfully connect to a new MySQL database. Complete the specific WordPress data import and export procedures by using the WordPress control panel (as shown in the image below).

Importing and Exporting With WordPress

Step 4: Install and configure WordPress

Access and deploy the web app

In order to access the web app you created earlier, go to the WordPress configuration page and select the required language. The content in the image below will then appear on the screen.

Configuring WordPress

Connect and configure the MySQL database

Enter the configuration details for the database created in Step 2 into the interface shown in the image below.

Connecting to WordPress

If you see what appears in the image below, WordPress is now connected to MySQL.

Successfully Connected to WordPress

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

Step 5: Use WordPress

Once you have completed the process above, 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.

Installing WordPress