Prerequisite: WordPress database is already preexisted on your database server
- The App Service plan hosting your app and the database server are running in the same region to avoid performance issues.
- Use Azure MySQL Flexible Server as database.
- Keep the database in the same VNET as your App Service. Follow the steps described here.
- The MySQL database version should be compatible with the new WordPress version running on Linux App Service.
- Backup your WordPress site and database.
- WordPress backups
- Backing up your database for more details.
- Launch the Azure Portal and navigate to your App Service -> Configuration blade. Update the database name, database server, user name & password in the Application Settings of App Service and save it. This will restart your App and the new changes will get reflected.
| Application Setting Name |
|--------------------------------|
| DATABASE_NAME |
| DATABASE_HOST |
| DATABASE_USERNAME |
| DATABASE_PASSWORD |
Reference: WordPress Application Settings