How-To

Migrate a WordPress site between two cPanel accounts

This is a manual migration, which doesn't use any plugin.

✔️ Zip and move your site files
✔️ Export & import the database
✔️ Update wp-config.php
✔️ Fix URLs (if needed)
✔️ Point DNS & confirm SSL

1) Pre‑flight checklist

  • ✅ Destination account has enough disk space and a domain/addon domain created.
  • ✅ PHP version & extensions on destination are compatible with your WordPress + plugins.
  • ✅ You have cPanel logins for both accounts.
  • ✅ (Optional) Create a temporary subdomain at the destination for testing.
Note: This guide covers website files + database. Email accounts/forwarders are separate.

2) Back up the source site (files + DB)

2.1 Files

  1. Open cPanel → File Manager on the source account.
  2. Navigate to your site’s directory (usually public_html/ or an addon domain folder).
  3. Select the WordPress files and click CompressZip Archive → name it (e.g., sitefiles.zip).
  4. Download the zip to your computer.

2.2 Database

  1. Open cPanel → phpMyAdmin on the source account.
  2. Select the site’s database in the left sidebar.
  3. Click ExportQuickSQLGo to download backup.sql.

3) Prepare the target cPanel

  1. Create a domain/addon domain for the site in the destination cPanel (if not present).
  2. Create a new MySQL database and MySQL user via MySQL® Databases. Give the user All Privileges. Note the database name, username and password.
Tip: In cPanel, database and user names usually get a prefix like cpuser_ — that prefix is required when you set credentials in wp-config.php.

4) Upload & extract files

  1. Open cPanel → File Manager on the destination account.
  2. Go to the document root of the target domain (e.g., public_html/).
  3. Click Upload and upload sitefiles.zip.
  4. Select sitefiles.zip and click Extract.

5) Import the database

  1. Open cPanel → phpMyAdmin on the destination account.
  2. Select the new database you created.
  3. Click Import → Choose file backup.sqlGo.

6) Edit wp-config.php

Update database credentials so WordPress connects to the new database:

/** Database settings **/
define('DB_NAME', 'cpuser_dbname');
define('DB_USER', 'cpuser_dbuser');
define('DB_PASSWORD', 'SuperStrongPasswordHere');
define('DB_HOST', 'localhost'); // Check with your host if different

$table_prefix = 'wp_'; // Match the prefix of the imported database

Open wp-config.php in File Manager → Edit. Save when done.

7) Update URLs (only if the site URL changed)

If the domain didn’t change, you can usually skip this. If you moved to a different domain or a different path (e.g., from a subfolder), update the site address values.

Option A: Quick tweak in wp-config.php

// Add temporarily, then remove after confirming in Settings → General
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');

Option B: Update via SQL in phpMyAdmin

UPDATE wp_options 
  SET option_value = 'https://example.com' 
  WHERE option_name IN ('siteurl','home');

Adjust the table prefix if not wp_. For deep replacements inside content and widgets, consider a serialized‑safe search/replace tool or WP‑CLI.

8) Switch DNS & verify SSL

  1. Point your domain to the destination hosting (either update the A record to the new IP, or switch nameservers).
  2. Wait for DNS propagation (usually up to 24 hours).
  3. In cPanel, check SSL/TLS Status. AutoSSL should issue a free DV certificate after DNS resolves to the new server.
If HTTPS shows warnings, run AutoSSL again from your hosting panel (where available), and ensure the domain resolves to the destination before attempting issuance.

9) Post‑migration checks

  • Settings → Permalinks → Save (flushes rewrite rules).
  • Re‑install/activate caching or security plugins (if they were host‑specific).
  • Verify file uploads, contact forms, and any API keys tied to the old host.
  • Check Site Health in WordPress Admin for notices.

Troubleshooting

  • Error establishing a database connection: Re‑check DB_NAME, DB_USER, DB_PASSWORD, privileges, and host.
  • White screen / 500 errors: Confirm PHP version compatibility and disable any opcode/object caching left from the old host. Check error_log in the site root.
  • Mixed content (HTTP↔HTTPS): Ensure the site URL is HTTPS and purge any caches. Consider a content search/replace for http:// assets.
  • Broken images/links after domain change: Run a serialized‑aware search/replace (e.g., WP‑CLI search-replace) to update embedded URLs.

FAQ

Do I need to reinstall WordPress? No. You move the existing files and database, then update wp-config.php.

What about email accounts? Those are separate from the website. If moving email too, recreate mailboxes on the new host and migrate mail using IMAP sync tools or your mail app.

Database host? On most cPanel shared plans it’s localhost