Plesk to Plesk Migration

Reading Time: 9 minutes

Migrating from one Plesk installation to another is easy with the Plesk Migrator Tool! The Plesk team has done a great job creating an easy to use interface for migrating entire installations of Plesk to a new server.

If you need to move files, users, subscriptions, FTP accounts, mail and DNS servers setup through Plesk, this guide will help you successfully navigate the process and come out victorious!

We will be splitting this tutorial into three sections:

Pre-flight

You will need:

  1. Two Plesk installations and a basic working knowledge of Plesk and DNS.
  2. The current server you are migrating sites from with Plesk installed (Source Server)
  3. The new server you are migrating sites to with Plesk installed with an equal or higher version number. (Destination Server)

If you are looking for a great VPS with Plesk pre-installed and ready to go, try one of our Liquid Web VPS packages!

Special notes:

  1. While this guide is for Windows servers, the same process applies to Linux servers with the exception of the RPC agent tool, the location of the .hosts file, firewall rules and scripts.
  2. Only settings that have been configured within Plesk will be migrated. If you have done any special configuration changes outside of Plesk (which is not supported) these settings will not move properly, and you will have to re-configure them manually.
  3. This guide assumes you are moving to new IP addresses. If you are maintaining the same IP addresses, you will have to work with your hosting provider and configure a loopback adapter to successfully migrate IP addresses to a new server. This is not something Plesk will do natively.
  4. The Plesk Migrator Tool copies data from one server to another. It does not automatically delete any data such as subscriptions or customers from the source server. This allows us the ability to test migrated sites before going live and shorten any downtime from live services.

 

Initial Sync for Plesk Migration

To begin the installation, log in to your Plesk Administration Panel on the destination server (the new server you are migrating sites to) by logging into https://127.0.0.1:8443 where 127.0.0.1 is your destination servers IP address or domain name used by Plesk.

Once logged in, you will navigate to Extensions > My Extensions > Plesk Migrator.

For the initial sync in a Plesk to Plesk migration you'll want to go to the Plesk Migrator.

Open the Plesk Migrator (you may have to press Open twice) and then click Start a New Migration located at the top of the page. This will open a page that looks like the following:

When doing a Plesk to Plesk migration you'll fill out the New Migration request.

Now fill in the required fields.

The Address is the IP address of the source server you are migrating sites from.

For Setup, we will first attempt Automatic.

Enter the Plesk login for the source server.

Leave the Temp Directory as it is unless specifically needed.

Enter the Plesk login credentials for the destination server you are migrating sites to.

Now click Prepare Migration.

At this point one of two things happen:

  1. You will either see the Preparing Migration load bar complete, and it moves to the next page. Note: It may take some time for the progress bar to complete.
    OR
  2. An error will pop up and say “Panel Migrator failed to connect to RPC Agent running on ‘<your-ip>’ server. RPC Agent is required for communication between the current server and ‘<your-ip>’ server”. A migration error may pop up when migrating Plesk to Plesk.A migration error may pop up when migrating Plesk to Plesk.
If you receive the error above follow these directions
If you receive the error above, it would provide you with a download link to the Plesk RPC Agent. The reason the migrator tool could not connect initially is usually due to a firewall or network configuration preventing that communication. The RPC agent creates a direct connection between the servers for transmitting migration commands from the destination server’s Plesk installation.

You will want to download this executable and copy it to the source server. Right-click the RPC Agent executable named run-panel-migrator.exe and Run as Administrator. You should now see the following…You'll see the following message when using the Plesk RPC agent.

Leave this open for the duration of the migration. This will allow a secure connection between your two servers for the migrator tool to communicate. Navigate back to the destination server’s Plesk control panel and change the Setup type from Automatic to Manual and re-try the connection by clicking Prepare Migration.

This time it will bring you to the next step in the Migrator Tool. This page is where you select what data you would like to transfer. You can migrate by subscription, customer, reseller or hosting plan depending on your needs. In most cases, moving by subscription will be the best option. This is what we will do in this guide.

You can migrate all available subscriptions or move one or two. It’s up to you! Simply select the checkboxes you desire and click Select Object. You can always remove items from the list if you select the wrong one.

For our example, we will be moving only one subscription which contains the domain, all mail messages, files, and databases to the new server.When migrating from Plesk to Plesk you'll be able to move the domain, all mail messages, files and database to a new server.

Now that we have selected our subscriptions to migrate (or all of them!) and selected migrate mail messages, migrate website files, and migrate database data, we can begin.

Click Migrate.

Plesk will go through its pre-migration checks and compare the servers and files to make sure it is compatible. If you failed any pre-migration checks, it will provide you with any error(s) and how to resolve it.

Once this is done, click Start Migration.

You will now see a progress bar and exactly what step your migration is on for each subscription you are migrating. This is helpful for monitoring the progress and status of your migration.Within this screen you'll swee which step you are in your migration.

Now, you wait! This process can take a few minutes or many hours depending on how much data you are moving. This is dependent on website file sizes, database sizes, mail messages and more. You are able to leave this page and come back to the Plesk Migrator extension anytime you want to recheck the migration progress.

Once the migrations are complete, it will show a green banner saying that your subscriptions have been migrated and it will display any issues that arose during the process.

 

Testing the New Plesk Environment

At this point, we can begin the testing phase on the destination server to make sure all websites are functioning properly before we final sync and go live on the new server. We can accomplish this using the .hosts file.

The hosts file works by letting you locally designate which IP address a domain points. This won’t affect live service for the domain, as IP changes would need to be handled at the DNS level, but it allows you to see the site as if it were running from your specified IP address, in this case, the destination server.

To get a list of domains and their associated IP addresses, you can run the following command from command prompt on the destination server. You can access command prompt by going to Start > Run and typing in cmd and running it.

Enter the following command:

%plesk_bin%\dbclient.exe" --direct-sql --sql="SELECT iad.ip_address, dom.name FROM domains dom LEFT JOIN DomainServices d ON (dom.id = d.dom_id AND d.type = 'web') LEFT JOIN IpAddressesCollections ia ON ia.ipCollectionId = d.ipCollectionId LEFT JOIN IP_Addresses iad ON iad.id = ia.ipAddressId;

This command will give you a list in the following format:

<ipaddress> exampledomain.com

<ipaddress> example2.com

<ipaddress> example3.com

Highlight and copy these results. Navigate to C:\windows\system32\drivers\etc in file explorer and open the .hosts file with Notepad. The file will include a blurb about the HOSTS file and have examples such as:

127.0.0.1 localhost
::1 localhost
127.0.0.1 mewebmail.localhost

Paste your copied results at the end of this file and save.

Now you will be able to go to your browser on the destination server and access any of these domains from the new server without affecting live services. You can verify that you are seeing information from the destination server by making a modification on the file or database and seeing this reflected in your browser on the destination server.

If you do not see the changes, try accessing the site via a private or incognito windows within your chosen browser. This will let you access the site without cached information.

Go through each of your websites and test their functionality. Make sure the data is correct, and website features are functioning as expected.

If you are experiencing issues with database connections, you will need to modify connection string in your website(s) to point to your domain name (which is loading locally via the hosts file) or to the correct destination IP address, this way the site is loading the local SQL database servers. It is usually recommended to use ‘localhost’ for your database server, if databases and web content will be loaded from the same server, which would avoid this configuration issue. These connection settings are often located in web.config file on Windows or in your server-side configurations (wp-config.php for WordPress, for example). These settings are dependent on how your site was developed.

Does everything look good? Great!  We can now move on to the final sync. Delete or comment out the changes you made to your .hosts file on the destination server. Otherwise, make adjustments to your destination server’s configuration or add any necessary missing modules to make sure it is compatible with the sites you are migrating, and re-test.

 

Final Sync in Plesk

DNS

To reduce downtime during the final sync, you will want to update your TTL (Time To Live) values in your domains DNS records to 300. This can be done at your domain registrar.

Lowering this value from its default value to 300 will allow DNS updates to occur every 5 minutes instead of every few hours. This ensures your transition to the new server goes quickly and propagates globally in just a few minutes.

Note
It is ideal to make these changes 24 hours beforehand, so the new DNS TTL settings are fully propagated.

Block Public Facing Ports

During the final sync, you will want to block all public facing ports on your source server. We want to do this because we do not want data to be updated on the source server while we are syncing the data. If something is updated on the source server, that change may not reflect on the destination server.

To block public facing ports, we can run the following command in command prompt to create a firewall rule:

netsh advfirewall firewall add rule name=Final_Sync_Block protocol=TCP dir=in action=block localport=21,25,80,110,143,443,1433,3306

This command blocks common ports for services such as FTP, Mail, HTTP, SSL, and SQL servers. This ensures no clients are updating information from your website or mail servers.

Note
You should only run this command if you want to block all public facing ports for all websites on the server. If you are only moving a single domain, this will break your other sites while the firewall rule is enabled. Unfortunately, there is no great way to block ports for specific Plesk websites, so if you do not want to temporarily disable all public facing ports, then you will want to limit the usage of the website during the final sync or be prepared to lose data that was entered before the DNS change has been made.

Beginning the Final Sync

So now that you have tested your websites on the new server, blocked all public facing ports, and updated your DNS TTL values, we are ready to perform a final sync your data and go live.

To do this, log in to Plesk on the destination server, browse to Extensions > My Extensions > Plesk Migrator Tool. You will see your current migration with the host of your source server’s IP address.

Click on the IP address (do not click Finish Migration, this will remove the migration meta-data from Plesk and you will have to start the process over from the beginning).

You will see the sync completion screen that we saw earlier. It looks like this:When the Plesk migration is complete you'll see the "sync completion" screen.

At the top, click List of Subscriptions then click Switch to Advanced Mode.

You will see a list of all subscriptions in your account. Check any subscription or all subscriptions that you are migrating and click the Re-Sync button at the top of the page.Check any subscription or all subscriptions that you are migrating and click the Re-Sync button at the top of the page.

It will prompt you to select which content you would like to re-sync, including business objects, website files, database data, and mail messages. You will most likely leave the default information checked which is website files, database data, and mail messages.

Any information that was changed from the initial sync until now will be updated to the current version if checked. If you have made changes on the destination that you do not want to be replaced, select your checkboxes accordingly.

Click OK.

Your subscriptions are now re-syncing all selected data to the destination server. You can watch this progress by going back to the Overview section of the Migrator Tool.

Final Steps

Now that all subscriptions have been re-synced, there are a few final steps to take before you are live.

First, update your database connection strings if necessary. Again, these should be pointing to your domain or your new server’s IP addresses. If you did not re-sync web files, the changes you made during testing would remain intact.

Now, update your DNS A records. You will want to go to your nameservers (e.g., Namecheap, GoDaddy or Liquid Web’s DNS management if you registered it through us) and update all A records for your domains to their new respective IP addresses. You can verify which IP addresses are configured to each domain by running the command from the Testing phase again or by navigating to Tools & Settings > IP Addresses and clicking on Sites for each IP to see what is assigned to it.

Your DNS changes will take around 5-10 minutes to propagate globally with the lowered TTL values. You can check the status of the propagation by going to, for example, DNSChecker.org or WhatsMyDNS.net and entering your domains. You will see which IP address each location is using around the world and can watch them update in real time by refreshing the page.

Take a break! You have now completed your Plesk to Plesk Migration!

Once you are done, close the RPC agent command shell on the source server. When you have verified everything is working, you can remove the new firewall rule we created on the source server. You can remove this firewall rule by running the following command in the command prompt:

netsh advfirewall firewall delete rule name="Final_Sync_Block"

And really, that’s it! The Plesk Migrator tool makes the process of migrating entire Plesk installations to a new Plesk server, a walk in the park. While you may receive errors along the way, Plesk’s useful details will show you what errors are occurring and how to resolve them.

We hope your Plesk migration has gone smoothly! Compared to the traditional ways of migrating websites, Plesk does a fantastic job of making this easy for the end user.

Looking for a great VPS with Plesk pre-installed and ready to go? Try our Liquid Web VPS packages and speak to a specialist today!

Author Bio

About the Author: Mike Sherman

Mike Sherman shares a wealth of IT experience with our Knowledge Base center. He regularly shares how-to articles on Ubuntu, CentOS, Fedora and much more!

Refer a friend and receive hosting credit