• Dienstag, Septembre 30, 2025

Transitioning your hosting environment from cPanel to Plesk can streamline server management and enhance your web presence. The Plesk Migrator tool offers a reliable and efficient solution for this process, supporting a seamless transfer of websites, databases, mail accounts, and other critical data. This comprehensive guide details two primary methods for utilizing Plesk Migrator, ensuring you can choose the approach that best suits your technical comfort and operational requirements.

Understanding the Migration Methods

Plesk Migrator provides two distinct avenues for transferring your cPanel data to a new Plesk installation:

Method 1: Utilizing the Plesk Panel

This method offers a user-friendly graphical interface, making it ideal for those who prefer guided steps and visual cues.

  1. Access Plesk: Begin by logging into your Plesk control panel.
  2. Locate Extensions: Navigate to the "Extensions" option situated on the left-hand side of the screen.
  3. Install Plesk Migrator: In the Extensions section, search for "Plesk Migrator" within the "Server Tools" category. Click "Install" to integrate the extension into your Plesk environment. extensions plesk migrator
  4. Launch Migrator: Once installed, proceed to "Extensions > My Extensions," then click "Go to Extension" for Plesk Migrator to open its interface.
  5. Initiate Migration: Click "Start a New Migration" to launch the guided migration wizard.
  6. Configure Source Server: Select cPanel as your source platform. Accurately enter the IP address of your source cPanel server, specify the SSH port (the default is 22), and provide the root user’s login credentials for authentication.
  7. Prepare and Execute: Click "Prepare Migration" and meticulously follow any subsequent instructions displayed by the Plesk Migrator tool to ensure all prerequisites are met and the migration is ready to commence. prepare migration

Method 2: Leveraging the Command Line (CLI through SSH)

For system administrators and advanced users, performing the migration via the command line offers greater control and automation possibilities.

  1. Plesk Access: Ensure you have administrative access to your Plesk instance.
  2. Install Plesk Migrator: As with the panel method, the Plesk Migrator extension must first be installed. Refer to the instructions in Method 1 (steps 2-3) for detailed installation guidance.
  3. Establish SSH Connection: Connect to your Plesk server using SSH with root privileges.
  4. Create Configuration Directory: Verify or create the necessary configuration directory by executing the following command:
    mkdir /usr/local/psa/var/modules/panel-migrator/conf
  5. Navigate to Directory: Change your current working directory to the newly created configuration folder:
    cd /usr/local/psa/var/modules/panel-migrator/conf/
  6. Create config.ini File: Create a file named config.ini within the current directory and populate it with the essential migration parameters. This file will define the source and target server details.
    # cat /usr/local/psa/var/modules/panel-migrator/conf/config.ini
    
    [GLOBAL]
    source-type: cpanel
    source-servers: cpanel
    target-type: plesk
    
    [plesk]
    ip: <destination_server_IP_address>
    os: unix
    
    [cpanel]
    ip: <source_server_IP_address>
    os: unix
    ssh-password: <source_server_root_password>
    # Uncomment ssh-port string below if the SSH port is not 22
    # ssh-port: <custom_ssh_port_if_not_22>

    Important Note: If your cPanel server hosts any PostgreSQL databases, it is crucial to include the PostgreSQL administrator password within the config.ini file. This ensures proper access and migration of these database instances.

    [optional]
    postgres-password: <password>
  7. Generate Migration List: Generate a comprehensive list of accounts available for migration from the source server using the command below:
    /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator generate-migration-list

    This generated list is fully customizable, enabling you to selectively exclude specific domains or assign them to particular service plans on the target Plesk server. You can edit this file as needed:

    vi /usr/local/psa/var/modules/panel-migrator/sessions/migration-session/migration-list
  8. Initiate Account Transfer: Once the migration list is finalized, begin the transfer of accounts from your source cPanel server to Plesk:
    /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator transfer-accounts
  9. Resynchronize Data: To ensure that all recent changes and updates are copied and reflect the latest state of your data, perform a data resynchronization:
    /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator copy-content

    This command efficiently utilizes rsync, intelligently skipping files that remain unchanged, thereby optimizing the transfer process.

  10. Verify Migration: As a final and crucial step, verify the successful migration and operational correctness of all transferred data and services:
    /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator test-all

By diligently following these steps, you can successfully migrate your hosting environment from cPanel to Plesk using the Plesk Migrator tool. Whether you opt for the intuitive Plesk panel interface or the powerful command-line method, Plesk Migrator provides the necessary functionalities to ensure a robust and efficient transition for your websites and applications. A well-executed migration sets the foundation for improved performance, security, and ease of management within the Plesk ecosystem.