Migrate WordPress in CloudPanel to 1Panel

1Panel is a modern, open-source Linux server management panel designed to help users easily manage their servers through a simple and intuitive web interface. Its key features include efficient host monitoring, file and database management, one-click website setup, an application store, and robust security measures. Additionally, 1Panel supports container-based deployments and offers one-click backup and recovery features to ensure data security. With its open-source transparency, low resource usage, high security, and flexibility, 1Panel is an ideal choice for server management. If you’re considering migrating to 1Panel, you can follow these steps to make the transition smoothly.

Step 1: Backup Your WordPress Website in CloudPanel (Also applicable to other panels)

  1. Backup Files:
    • Use the CloudPanel file manager or access your server via SSH to navigate to your WordPress directory.
    • Compress the entire WordPress folder into a .zip file or similar.
    • Download the compressed file to your local machine.
  2. Backup Database:
    • Go to the Database section and export your WordPress database using phpMyAdmin or MySQL CLI.
    • Save the exported .sql file on your local machine.

Step 2: Prepare 1Panel for WordPress

  1. Install 1Panel:
    • Set up 1Panel on your new server by following the installation instructions from the 1Panel documentation.
    • Once installed, log into 1Panel through its web interface.
  2. Set Up a WordPress Environment:
    • In 1Panel, you can use One-Click App Installation to install WordPress from the App store but for this task we are going to set up it manually.
    • WordPress need to have PHP + MySql, first we need to create a PHP runtime environment by clicking Runtime and Create button.
    • Install MySql from App store, then go to Database and create a new database (you’ll need these credentials when importing your data).
  3. Create WordPress website:
    • Create the WordPress website, when page pop up select Runtime instead of the default selection(Deployment).
    • Select the Runtime environemt you just created from Step 2 and Confirm to create the website.

Step 3: Transfer Files to 1Panel

  1. Upload WordPress Files:
    • Access your new server via 1Panel’s file manager or use SSH/SFTP to upload the backup .zip file to Index folder.
    • Extract the compressed WordPress folder into the appropriate web directory, by default the files should be in Index folder.
  2. Import the Database:
    • Use 1Panel’s Database Management page or access via phpMyAdmin to import the .sql database backup you saved earlier into the new database created in Step 2.

Step 4: Configure WordPress

  1. Update the wp-config.php File:
    • Edit the wp-config.php file in your WordPress directory to reflect the new database details (DB name, username, password, and host), please note the host should be changed to ‘mysql‘ instead of the default 127.0.0.1 or others.
  2. Update User/Group premission from Wesite Setting
    • If you skip this steps you will see ‘Access denied’ when you browse the website.
    • Click the domain name from the Website management page
    • Click ‘Directory’ and then under User/Group line click ‘Save’ button.
  3. Update Pseudo-static Scheme for WordPress
    • Click Pseudo-Static after you updated User/Group premission from last step
    • Select ‘WordPress’ for Scheme and click ‘Save and Reload’
  4. Fix URL Settings:
    • If your domain or server URL has changed, log into your WordPress admin dashboard and update the Site URL and Home URL under Settings > General.
    • Alternatively, you can update these values directly in the database by editing the wp_options table if you can’t access the WordPress admin dashboard.

Step 5: Point Domain to New Server

  1. Update DNS Records:
    • Update the DNS settings for your domain to point to the IP address of the new server running 1Panel.
    • This may involve updating A records in your domain registrar’s control panel.

Step 6: Test the Website

  1. Check Website Functionality:
    • Once the DNS changes propagate, visit your website and check if everything is working correctly.
    • Verify that images, pages, and posts have been migrated properly, and all plugins/themes are functioning as expected.
  2. Troubleshoot Issues:
    • If any issues arise (broken links, missing images, etc.), review your file and database transfers, ensuring all paths and URLs are correctly configured.

By following these steps, you can smoothly migrate your WordPress website from CloudPanel to 1Panel while minimizing downtime.

Leave a Reply

Your email address will not be published. Required fields are marked *