Microsoft Solutions
6 min
Business Scenario:
The following are some reasons why you might want to migrate your WordPress website to the Azure web app:
- You are developing a WordPress website that you predict will grow in size, and complexity over time and requires a highly scalable infrastructure that can grow with your website.
- WordPress website is currently hosted on a third-party hosting provider’s data center or on-premises physical machine, and you cannot upgrade hardware because of the unavailability of supported hardware in the market.
- Moving the website from one to another physical server will take longer time, effort, and cost. Also, you will face the same problem in the future.
- You would like to host (MySQL) database layer on a separate server or use PaaS service for better performance and stability.
Challenges:
- WordPress and MySQL are open-source products, and because of that, there is yet to be any official support available for migrating WordPress website data from one system to another.
- The WordPress website and MySQL database are hosted on the same server, which is a single point of failure for both services. If this server is compromised, hackers will easily access both systems.
- Migrating a WordPress website includes copying all its files and folder structure, its MySQL database, and changing the file to point to the new MySQL database. These tasks are very complicated for a large site and may require specific skills related to website configuration and MySQL database administration.
- Migrating a WordPress site to a new hosting provider or web server can be complex for any WordPress user. This is understandable since a poorly executed WordPress migration can result in downtime and dataloss.
- No out-of-the-box solutions are available in Azure to migrate a WordPress website to an Azure Web App.
- The manual migration (export and import data) method could be more user-friendly, and there are possibilities of human error and data loss.
Solution Strategy:
- After examining various methods, we discovered the All-In-One WP Migration application, which automates the migration of the MySQL database and the content of WordPress websites while supporting all third-party plugins. With this migration strategy, you can keep using the existing WordPress site.
- Create a new WordPress app using azure WordPress on Linux App Service template.
- Create a new MySQL database server on Azure for MySQL. It is a fully managed (PaaS) MySQL database service.
- Install All-in-One WP Migration Plugin on Source and destination WordPress sites.
- Install and add all extensions and plugins running on the source site.
- Install All-in-One WP Migration Plugin on Azure WebApp WordPress Website.
- Export production or existing WordPress website data from the source site
- Launch the WordPress Admin page and Open All-In-One WP Migration plugin.
- Click on the ‘Export’ option and specify the export type as a file.
- This bundles the contents of the plugins, themes, database, and media files into a single file, which can then be downloaded.
- Import WordPress website data to the destination site (Azure WebApp WordPress website).
- Launch the WordPress Admin page and Open All-In-One WP Migration plugin.
- Click on the import option on the destination site, and upload the file downloaded in the previous section.
- Empty the caches in the W3TC plugin (or any other caches) and validate the site’s content.
- Update WordPress web-config as per azure web app environment variable strings.
- Update path and hyperlinks with new host server (Azure WebApp) information in PHP code, wp-content, and database using plugins like Search and Replace to update the database records.
- Install recommended plugins like Local Redis Cache, Azure CDN, and Azure Blob Storage
- Configure Custom domain, create A and Cname record for azure web app hosted website in your existing domain (GoDaddy) service provider, and Mapped custom domain to migrated Azure WordPress Webapp site.
- Update existing SSL Certificate to migrated Azure WordPress Webapp site.

Outcome & Benefits:
- WordPress website hosted on Azure Web App is resilient, secure, and cost-optimized.
- You are utilizing managed host facility with High availability and auto-patching.
- Easy to manage and deploy the website application.
- Easy to back up and restore website data.
- Built-in auto scale and load balancing service
- SaaS benefits like easy cloning and cert management
- Website database on Azure Database for MySQL is cost-effective and easy to set up, operate, and scale.
- Advanced security, same-zone or zone-redundant high availability, and a service-level agreement (SLA) of up to 99.99 percent
- Improved database and website performance three times faster than the earlier
- You will see a cost reduction in monthly invoices after this migration.