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 on the Azure server
Use the Azure portalto create your MySQL server. You can also create the first database for the server during the creation process.
[!NOTE]
Ensure that you have selected Allow Azure Services to access the server, otherwise this may cause deployment to fail.
Step 3: Create a new web app
Sign in to the Azure Management Portal. Select New from the menu in the lower-left corner.
Click on Web + Mobile > , then Web App > , and then Create. Enter the App Name and Resource Group. At this point, you can create or select the App Service Plan/Location.
- Click on Create and wait for Azure to complete the operation.
Deploy the WordPress installation files
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. For more information on the specific method, see Publishing to Azure Web Apps from source control.
Note
Step 3 is primarily for new users of WordPress. If you have used Azure Web Apps and successfully deployed the WordPress installation file and started to use it, to maintain content consistency, export the data and re-install and deploy WordPress. After it has successfully connected with the new MySQL database, import the data. Complete the specific WordPress data import and export procedures by using the WordPress control panel (as shown in the following image).
Step 4: Install and configure WordPress
Access and deploy the web app
To access the web app you created earlier, go to the WordPress configuration page and select the required language. The content in the following image then appears:
Connect and configure the MySQL database
Enter the configuration details for the database created in Step 2 into the interface shown in the following image:
If you see what appears in the following image, WordPress is now connected to MySQL:
Click to proceed with the installation, and finish deploying WordPress.
Step 5: Use WordPress
After you have completed tis 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.