How to Migrate a WordPress Site to cPanel: A Complete Step-by-Step Guide

Migrating a WordPress site to a new hosting environment can feel daunting, especially when you are moving control panels or providers. However, cPanel simplifies the process significantly whether you are transferring a single blog or a high-traffic ecommerce store. With the right preparation and a clear step-by-step approach, you can move your entire site — files, database, and all — in under an hour.

This guide covers two primary migration paths into cPanel: the manual method using WordPress export tools and an FTP client, and the automated method using the built-in WordPress Toolkit. Both approaches are reliable, but the right choice depends on your technical comfort level and the complexity of your site.

Pre-Migration Checklist: What You Need Before You Start

Before touching any files or databases, take fifteen minutes to prepare. Skipping this step is the number one cause of broken migrations.

  • A full backup of your existing site. Use a plugin like UpdraftPlus, All-in-One WP Migration, or your current host’s backup tool. Download both the files and the database export to your local machine.
  • cPanel access on the destination server. You need the login URL (typically https://yourdomain.com/cpanel or https://hostname:2083), your username, and password.
  • A fresh WordPress installation (optional but recommended). If you are using the manual method, you can install WordPress fresh in cPanel and then import your content. If you are using WordPress Toolkit, the tool handles provisioning.
  • Your domain pointed to the new server. Update your nameservers or A record at your registrar so the domain resolves to the destination IP. DNS propagation can take up to 48 hours, so plan accordingly.
  • PHP version compatibility. Check what PHP version your current site runs (look in wp-config.php or your old host’s control panel) and ensure the destination cPanel server supports it. cPanel users can switch PHP versions easily under the MultiPHP Manager section.

Method 1: Manual Migration Using Export, FTP, and phpMyAdmin

This method gives you full control over every file and database entry. It is the best choice for developers comfortable with FTP clients and database tools like phpMyAdmin.

Step 1: Export Your WordPress Content

From your old WordPress admin dashboard, go to Tools → Export and choose All content. WordPress generates an XML file containing your posts, pages, comments, custom fields, categories, and tags. Download this file to your computer. Note that this export does not include media files (images, PDFs, videos), plugins, or theme settings.

Step 2: Download Your wp-content Folder via FTP

Connect to your old server using an FTP client like FileZilla. Navigate to the WordPress root directory (usually public_html or a subfolder) and download the entire wp-content folder. This folder contains your uploads, plugins, and themes. Depending on the size of your media library, this transfer may take several minutes.

Step 3: Export the Database via phpMyAdmin

Log into your old host’s phpMyAdmin. Select the WordPress database from the left sidebar, then click the Export tab. Choose the Quick export method with the SQL format. Download the resulting .sql file. If your site is large, use the Custom export option and enable Add DROP TABLE / VIEW / PROCEDURE / FUNCTION to avoid conflicts during import.

Step 4: Upload Files to cPanel

In your destination cPanel, open the File Manager. Navigate to public_html (or the document root for your domain). If you performed a fresh WordPress install, simply overwrite the wp-content folder with the one you downloaded earlier. If you are building everything from scratch, upload the full WordPress core alongside your wp-content folder.

Step 5: Create a Database and Import Your SQL

In cPanel, open the MySQL Databases wizard. Create a new database, a database user with a strong password, and assign the user to the database with All Privileges. Then open phpMyAdmin, select your new database, go to the Import tab, and upload your .sql file.

Step 6: Update wp-config.php

Use cPanel’s File Manager to edit wp-config.php in the WordPress root directory. Update the following lines with your new database credentials:

define('DB_NAME', 'your_new_database_name');
define('DB_USER', 'your_new_database_user');
define('DB_PASSWORD', 'your_new_user_password');
define('DB_HOST', 'localhost');

Save the file and close. If your server uses a remote database host, replace localhost with the hostname provided by your host.

Step 7: Search and Replace URLs

If your domain stayed the same, you can skip this step. If your domain changed, you need to update all references in the database. Use a plugin like Better Search Replace or a WP-CLI command:

wp search-replace 'https://old-domain.com' 'https://new-domain.com' --all-tables

Never use a simple Find/Replace in a text editor on the SQL file — it can break serialized data. Always use a tool designed for WordPress serialized data.

Method 2: Using WordPress Toolkit for One-Click Migration

cPanel’s WordPress Toolkit is available on most modern hosting plans. It automates the heavy lifting and is the fastest path for site owners who want a hands-off experience.

Step 1: Access WordPress Toolkit

Log into your cPanel dashboard and scroll to the Software section. Click the WordPress Toolkit icon. If you do not see it, contact your host — some plans require it to be enabled.

Step 2: Use the Migrate Feature

Inside WordPress Toolkit, click the Migrate button in the toolbar. You will be prompted to enter your source site’s URL and the WordPress admin credentials. The toolkit then connects to the source site, packages the files and database, and transfers everything to the destination server.

Step 3: Review and Finalize

Once the migration completes, WordPress Toolkit presents a summary. It will automatically update the site URL, replace hardcoded links, and configure the database connection. Log into your WordPress admin on the new server to verify that all plugins, themes, and media are intact.

The toolkit also offers a staging environment feature — you can clone your migrated site to a staging subdirectory, test everything, and then push the staging site live. This adds a safety net for complex migrations.

Post-Migration Testing: What to Verify

A successful migration is not done when the files finish copying. Run through this checklist to confirm everything works:

  • Front-end rendering. Visit your homepage, a few blog posts, and a product page (if applicable). Check for broken layouts, missing images, or 404 errors.
  • Login and admin functionality. Log into /wp-admin with your credentials. Navigate through several admin screens to confirm there are no database connection errors.
  • Permalinks. Go to Settings → Permalinks and click Save Changes to flush the rewrite rules. This fixes 404 errors on individual posts and pages.
  • Media library. Open the Media Library and confirm all images and files appear. If thumbnails are missing, regenerate them with a plugin like Regenerate Thumbnails.
  • Email functionality. Test contact forms and password reset emails. cPanel handles mail services, but your domain may need updated MX records.
  • SSL certificate. Enable cPanel’s AutoSSL under the SSL/TLS Status section. It provisions a free Let’s Encrypt certificate within minutes.

Troubleshooting Common Migration Issues

Even with careful planning, things can go wrong. Here are frequent problems and their fixes:

White screen of death after migration. This is usually a PHP error. Enable WordPress debugging by adding define('WP_DEBUG', true); to wp-config.php. Check the error log via cPanel’s Errors section to identify the culprit — often a plugin or theme incompatible with the new PHP version.

404 errors on every page except the homepage. Your permalink structure broke during the transfer. Log into WordPress admin, go to Settings → Permalinks, and click Save Changes. If the issue persists, ensure your server has mod_rewrite enabled — cPanel typically has this on by default.

Images not loading. The media library paths are often hardcoded in the database. Run a search-and-replace tool to update the old domain to the new domain. If the domain did not change, check the uploads path in wp-config.php — it should match the location of your wp-content/uploads folder.

Database connection error. Double-check the DB_NAME, DB_USER, and DB_PASSWORD values in wp-config.php. Also verify that the database user was assigned to the database with all privileges in cPanel’s MySQL Databases section.

Key Takeaways

  • Always back up your entire WordPress site — files and database — before starting any migration.
  • The manual method (export + FTP + phpMyAdmin) gives you full control and works for any WordPress site regardless of hosting provider.
  • cPanel’s WordPress Toolkit offers a one-click migration path that automates file transfer, database import, and URL replacement.
  • After migration, update permalinks, test email functionality, and enable AutoSSL to secure your site.
  • Use search-and-replace tools designed for WordPress serialized data (like WP-CLI or Better Search Replace) to avoid corrupting your database.
  • If you encounter a white screen or 404 errors, start by enabling WP_DEBUG and flushing permalinks — these resolve the majority of post-migration problems.