AdminsForum

CloudPanel Backups & Migration Guides

Guide How to Move a WordPress Site to CloudPanel (Step by Step)

Started by JAY 0 replies 98 views
1JAY
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
How to move a WordPress site to CloudPanel (step by step)

Moving a WordPress site to a new server sounds scary, but it's really just four things: copy the files, copy the database, tell WordPress the new database details, and then point your domain to the new server. This guide walks you through each step in plain language, so you can do it even if it's your first migration.

Good to know before you start: your old site keeps working the whole time. Visitors only move to the new server when you change the DNS at the end, so there's no downtime if you follow the steps in order.

What you need
  • A server with CloudPanel installed.
  • Access to your old hosting: a file manager, FTP or SSH, and phpMyAdmin (or any way to download the database).
  • Access to your domain's DNS (at your registrar or Cloudflare).
  • About 30 to 60 minutes.

Step 1: Make a backup on the old server
You need two things from the old host:
  • The files: everything in the WordPress folder (the one with
    Code:
    wp-config.php
    and
    Code:
    wp-content
    ). Download it as one .zip or .tar.gz file. Most hosting panels have a "Compress" button for this.
  • The database: open phpMyAdmin, click your WordPress database, then Export and download the .sql file.
Tip: if you have SSH on the old server, this is quicker:
Code:
tar -czf site-files.tar.gz -C /path/to/wordpress . mysqldump -u DB_USER -p DB_NAME | gzip > site-db.sql.gz
Keep both files safe on your computer until the move is finished.

Step 2: Create the site in CloudPanel
  1. In CloudPanel, click Sites > Add Site > Create a PHP Site.
  2. For Application, pick WordPress. This loads Nginx rules that WordPress needs, such as pretty permalinks.
  3. Enter your Domain Name (the same domain as now), pick a PHP Version your site supports, choose a Site User and password, and click Create.
We use "PHP Site" here, not "Create a WordPress Site", because that option installs a brand-new, empty WordPress. You want your existing site instead.

Step 3: Create an empty database
Open the new site in CloudPanel, go to the Databases tab and click Add Database. Write down the database name, user name and password. You'll need them in Step 6.

Step 4: Upload the files
Upload
Code:
site-files.tar.gz
to the new server with SFTP, logging in as the site user (not root). Then log in with SSH as the site user and unpack it into the site folder:
Code:
cd ~/htdocs/www.example.com tar -xzf ~/site-files.tar.gz rm ~/site-files.tar.gz
Uploading and unpacking as the site user means the files get the right owner automatically, so you avoid permission errors later.

Step 5: Import the database
Upload
Code:
site-db.sql.gz
the same way. Then, as root, go to the folder where the file is and import it into the database you created:
Code:
cd /home/SITE-USER clpctl db:import --databaseName=YOUR_DB_NAME --file=site-db.sql.gz
Prefer clicking? You can also open phpMyAdmin from the Databases tab and use Import, but very large databases often time out there. The command line doesn't.

Step 6: Connect WordPress to the new database
Open
Code:
wp-config.php
in the File Manager (or with nano) and change these three lines to the details from Step 3:
Code:
define( 'DB_NAME', 'your_new_db_name' ); define( 'DB_USER', 'your_new_db_user' ); define( 'DB_PASSWORD', 'your_new_db_password' );
Leave
Code:
DB_HOST
as
Code:
localhost
(or set it to
Code:
127.0.0.1
if you get a connection error). Leave the
Code:
$table_prefix
line as it was on the old site.

Step 7: Test the new server before switching
Your domain still points to the old server, so test the new one privately. On your own computer, add a line to the hosts file:
  • Windows:
    Code:
    C:\Windows\System32\drivers\etc\hosts
    (open Notepad as administrator)
  • Mac / Linux:
    Code:
    /etc/hosts
Code:
NEW_SERVER_IP example.com www.example.com
Open your site in a private browser window and click around: home page, posts, images, the login page and wp-admin. When you're happy, remove that line again.

Step 8: Point your domain to CloudPanel
At your DNS provider, change the A record for
Code:
example.com
and
Code:
www
to the new server's IP address. Most visitors move over within an hour; some networks take up to a day. During this time both servers may get visitors, so avoid publishing new posts or taking orders until it settles.

Step 9: Turn on free SSL
Once the domain points to the new server, open the site in CloudPanel and go to SSL/TLS > Actions > New Let's Encrypt Certificate. Full guide: Free SSL in CloudPanel.

After the move: quick checklist
  • Log in to wp-admin and go to Settings > Permalinks, then click Save once. This refreshes your links.
  • Clear any caching plugin, and Varnish if you use it.
  • Send a test from your contact form; email often needs an SMTP plugin on a new server.
  • Set up backups on the new server.
  • Keep the old hosting for a week before you cancel it, just in case.

Common problems and quick fixes
  • "Error establishing a database connection": a typo in wp-config.php. Check the three DB lines against the Databases tab.
  • Home page works but other pages show 404: save permalinks again (see checklist), and check the site was created with the WordPress application.
  • Images missing: the wp-content/uploads folder didn't copy fully. Upload it again.
  • Site redirects to the old address: you changed the domain. Update
    Code:
    siteurl
    and
    Code:
    home
    in the wp_options table, or use WP-CLI's search-replace.
  • White screen: usually a plugin that doesn't like the new PHP version. Check the error log under Logs.

Sources (checked October 2026): CloudPanel CLI: root user commands

Stuck at any step? Ask in CloudPanel Backups & Migration Support and tell us which step and the exact error.
Reply
Possibly Related Threads…matched by title
Replies:0Views:105
Replies:0Views:120

Users browsing this thread: 1 Guest(s)
Forum Jump: