Migrate WordPress on App Service on Linux

Migrate WordPress on App Service on Linux

Export data from the source site

  1. Launch the WordPress Admin Page.
  2. Open the All-In-One WP Migration plugin.
  3. Select the file export option from the ‘Export” menu.
  4. Download the bundle.

Import data at the destination site

  1. Launch the WordPress Admin Page
  2. Open the All-In-One WP Migration plugin
  3. Upload the downloaded file by clicking on the import option.
  4. Validate the site content and empty the caches of the W3TC plugin or any other supplies.
    • Open the W3TC plug-in by clicking on the Performance link in the admin panel.
    • Click on the dashboard link below.
    • You will find a button on the dashboard with the label Empty all Caches.

Manual migration process

You can find the WordPress on Linux App Service for creating the WordPress on Linux Azure App Service.

Export data manually at the source site

Note:

This operation may take a few minutes, depending on your Internet connection and the size of your files.

  1. Download the wp-content from the source website. Use popular FTP software like FileZilla for connecting to the server and downloading the content.
  2. You can export the contents of a source database to an SQL file. This task can be performed using MySQL client software like HeidiSQL MySQL WorkbenchPhpMyAdmin, or the command line interface. Refer to the documentation for more information about exporting the database.

Import data manually at the destination site

  1. Create a WordPress app with our WordPress App Service template.
  2. Open an SSH connection using WebSSH via the Azure portal.
  3. Delete the existing content of the/home/site/wwwroot/wp-content folder using the following command.
  4. Bash Copy
  5. rm -rf /home/site/wwwroot/wp-content/* 
  6. Use the File Manager to upload the contents of the wp-content folder. Click the label that reads’Drag/Folder Here to Upload, or click one.
  7. You can migrate content from an existing MySQL database to a new Azure MySQL Flexible Server that App Service created on Linux.

Note:

Azure Database for MySQL Single Server will be retired by September 16, 2024. Consider migrating your MySQL database hosted on Azure Database MySQL – Single Server to Azure Database MySQL – Flexible Server by following the steps below or using Azure Database Migration Service.

  1. You can import the SQL files from your source database to the new WordPress database. It can be done via the PhpMyAdmin Dashboard available at .azurewebsites.net/phpmyadmin. If you are unable to upload a single large SQL file, then separate the files and try again. The steps to import the database via phpmyadmin will be described. Here is a link to the article.
  2. Navigate to the App service -> Configuration Blade in Azure Portal. Save the changes. The new changes will be reflected after restarting your App. Learn More: WordPress Application Settings
  3. App Setting: NamePlease Update Your Browser.
  4. DATABASE_NAME Replace the name of the exported database with “source.”
  5. DATABASE_HOST Not Required
  6. DATABASE_USERNAME Not Required
  7. DATABASE_PASSWORD Not Required

Post-migration actions

Install the recommended plugins.

It’s an optional step; after the site migration, it is recommended to validate that you have the default recommended/equivalent plugins activated and configured accurately as before. You can uninstall plugins if your company’s policies prohibit you from configuring them.

  • Suppose it was originally configured to use these services. In that case, the W3TC plugin must be activated and properly configured to use both the Azure CDN/Blob Storage and the local Redis caching server. Refer to the following documents for more information about how to configure them:
    • Local Redis Cache
    • Azure CDN
    • Azure Blob Storage
  • The WP Smush image optimization plugin is configured and activated correctly. Image Compression provides more information about configuration.

Recommended WordPress Settings

These WordPress settings are highly recommended. It is up to the users to decide if they want to use these WordPress settings when migrating their custom websites.

  1. Open the WordPress Admin Dashboard.
  2. Set the permalink to ‘day-and-name’ as this performs better than the plain permalinks, which use the format ?p=123.
  3. Enable the option to split comments into pages under the Comment Settings.
  4. Show excerpts in place of the entire post.

Search and Replace (Paths and Domains)

Users often encounter this problem when migrating their sites. They may find that the old website uses absolute paths and URLs instead of relative ones. You can resolve this problem by using plugins such as Search & Replace.

Custom domain configuration

Follow the steps below to configure your website with a custom domain: Map an existing custom DNS name.

Migration of custom domain

You can avoid DNS resolution downtime by binding the active DNS name to your App as described in a data-linktype=”relative-path” href=”https://learn.microsoft.com/en-us/azure/app service/manage/custom/dns_migrate_domain.” By securing the DNS name of your App to the DNS name that is currently active, you can avoid DNS resolution interruptions. See Migrate a DNS name for more information.

Leave a Reply