Appendix B: Adjusting Web Applications

When you migrate websites with web applications installed, the applications must be adjusted on the destination server to work correctly. You can adjust them manually or have Plesk Migrator do it for you.

Note: Plesk Migrator applies most fixes necessary for web applications to continue working after migration. However, it cannot cover all possible cases, especially custom configurations. If your web application does not work after migration, you need to fix the issue manually.

During migration, Plesk Migrator automatically adjusts the following web applications:

  • WordPress
  • Joomla!
  • Drupal (only version 7.x and later)
  • PrestaShop
  • Magento
  • Generic ASP.NET applications that use web.config files (for example, DotNetNuke)

Plesk Migrator adjusts web applications by:

  • Changing hostnames or IP addresses of database servers in applications’ configuration files.
  • Changing paths inside .html,.php, .aspx files.
  • (Plesk for Windows) Updating the web.config file (for example, if the source server had .NET 2 installed, while the destination has .NET 4).

Here's what application configuration files are changed by Plesk Migrator:

Web application Configuration file

WordPress

wp-config.php

Drupal (only version 7.x and later)

settings.php

Joomla!

configuration.php

PrestaShop

settings.inc.php

Magento

(Magento 1) app/etc/local.xml

(Magento 2) app/etc/env.php

Generic ASP.NET application which uses web.config files

Example: DotNetNuke

Name ends with ".config"

Example 1

You have Magento installed on your website hosted on a server with Plesk using a local database server. You want to migrate it to another Plesk server with a remote database server. The application will stop working after migration unless you change the Magento configuration.

Plesk Migrator can help Magento continue working on the destination server by automatically replacing localhost with the IP address of the remote database server in the Magento configuration file app/etc/local.xml.

Configuration file '/var/www/vhosts/myapps.tld/httpdocs/magento/app/etc/local.xml' of application 'Magento': adjusted database host.
Line #43 of the file was changed.
Before fix: <host><![CDATA[localhost:3306]]></host>
After fix: <host><![CDATA[10.52.143.116:3306]]></host>
Example 2

Your website's files are stored in /home/example.com on the source server. You have migrated the website, and its files are now stored in /var/www/vhosts/example.com on the destination server.

Plesk Migrator can change the paths found in PHP files as in the example below.

File '/var/www/vhosts/example.com/httpdocs/shop/order.php': fixed paths that were updated during migration.
Line #42 of the file was changed.
Before fix: $priceXml = '/home/example.com/shop/price.xml'
After fix: $priceXml = '/var/www/vhosts/example.com/httpdocs/shop/price.xml'
Switching off Adjusting Web Applications

By default, Plesk Migrator adjusts web applications during migration. You can have it skip adjusting applications if you want to adjust them manually or if you want to speed up the migration.

To turn off adjusting web applications:

[GLOBAL]
...
# [optional] adjust-applications
# Whether to fix configuration files of several commonly used web applications.
# The fix could include database connection changes, path fixes, and so on.
# By default this option is enabled. You could disable it if it breaks migration of some
# application, or if you need better speed of migration.
adjust-applications: false