How do you migrate a WordPress site manually using cPanel and phpMyAdmin?
Migrating a WordPress site manually using cPanel and phpMyAdmin involves downloading your website files via File Manager, exporting your database through phpMyAdmin, uploading both to your new hosting server, creating a new database, and updating your wp-config.php file to connect the files to the database.

Moving a WordPress website can feel like moving to a new apartment. When you have too many heavy boxes—or in tech terms, a very large database—automatic migration plugins often crash or time out. Doing it manually gives you 100% control, ensuring nothing gets left behind. This guide walks you through the process step-by-step using cPanel, the control panel provided by most web hosting companies.
What do you need to prepare before starting the migration?
Before touching any files, you must gather your login details for both your old (source) hosting account and your new (destination) hosting account, ensuring you have active access to their respective cPanel dashboards.
Preparation prevents panic. Here is a quick checklist of what you need ready:
- Old Hosting cPanel Access: To download your website files and database.
- New Hosting cPanel Access: To upload your files and create a fresh database.
- An FTP Client or File Manager: cPanel’s built-in File Manager is usually the easiest tool for beginners.
- A Plain Text Editor: Software like Notepad++, VS Code, or standard Notepad to edit configuration files.
Note for Bangladeshi students and local developers: If your local internet connection drops frequently during large file uploads, consider using a stable broadband connection or an FTP client like FileZilla, which allows you to pause and resume file transfers.
How do you back up and download your website files and database?
To back up and download your website files and database, use the File Manager in your old cPanel to zip and download your public_html folder, and use phpMyAdmin to export your SQL database file to your computer.

Your WordPress site lives in two separate places: the files (images, themes, plugins) stored on the server hard drive, and the content (posts, pages, settings) stored in a database. You must move both.
Step 1: Download your files
- Log in to your old hosting cPanel and click on File Manager.
- Navigate to the folder named public_html (this is where your website lives).
- Select all files and folders inside public_html.
- Right-click and choose Compress. Select Zip Archive and click compress.
- Once zipped, right-click the newly created
.zipfile and click Download to save it to your computer.
Step 2: Export your database
- Return to the main cPanel dashboard and open phpMyAdmin.
- Click on your WordPress database name from the left sidebar. (If you aren’t sure which one it is, check your
wp-config.phpfile for theDB_NAMEvalue). - At the top menu, click the Export tab.
- Leave the export method on Quick and format on SQL, then click Go. A
.sqlfile will download to your computer.
How do you set up the new hosting server and database?
To set up your new server, upload your website backup zip into the new public_html folder, extract it, create a brand new MySQL database using the MySQL Database Wizard in cPanel, and import your exported SQL file through phpMyAdmin.
Now that you have your backups safely stored on your computer, it is time to prepare your new hosting environment.
Step 1: Upload and extract files
- Log in to your new hosting cPanel and open File Manager -> public_html.
- Click Upload at the top, select the
.zipfile you downloaded earlier, and wait for the upload to complete. - Once uploaded, right-click the zip file and choose Extract. Extract the contents directly into the
public_htmlfolder.
Step 2: Create a new database
- Go back to the new cPanel and open MySQL Database Wizard.
- Step 1: Create a database name (e.g.,
mysite_db) and click Next. - Step 2: Create a database username and a strong password. Important: Copy and save these details in a notepad; you will need them shortly. Click Create User.
- Step 3: Check the box for All Privileges and click Make Changes.
Step 3: Import your database
- Open phpMyAdmin in your new cPanel.
- Click on the new database you just created from the left sidebar.
- Click the Import tab at the top.
- Click Choose File, select the
.sqlfile you downloaded from your old site, and click Go at the bottom.
How do you connect WordPress to your new database and fix errors?
To connect WordPress to your new database, open your wp-config.php file in the new public_html folder, update the database name, username, and password with your new credentials, and save the file.

Right now, your website files are on the new server, but they are still trying to talk to your old database. You must update the bridge.
Updating wp-config.php
- In your new cPanel File Manager, locate the wp-config.php file inside
public_html. - Right-click the file and choose Edit.
- Find the following lines of code and replace the values with the database details you saved earlier:
define('DB_NAME', 'your_new_database_name'); define('DB_USER', 'your_new_database_user'); define('DB_PASSWORD', 'your_new_database_password'); - Click Save Changes in the top right corner.
Common beginner troubleshooting
- Error establishing a database connection: This means your database name, user, or password in
wp-config.phpis incorrect. Double-check your MySQL settings in cPanel. - Broken links or images: If your domain name changed during the migration, you may need to update your site URLs in phpMyAdmin under the
wp_optionstable, or use a search-and-replace plugin once you log in. - White Screen of Death: This is often caused by an incompatible PHP version on the new host. Go to cPanel -> Select PHP Version and match it to your previous host’s version (e.g., PHP 8.1 or 8.2).
Frequently Asked Questions
What should I do if my database import fails in phpMyAdmin?
If your SQL file is too large for the phpMyAdmin upload limit, you can increase the upload limit in your cPanel PHP settings (under MultiPHP INI Editor) or use a tool like BigDump to import the database in smaller chunks.
Do I need to change my domain name during a manual migration?
No. If you are keeping the same domain name, the migration process is straightforward. If you are changing domains, you must also update your site URL values in the database wp_options table.






Leave a Reply
You must be logged in to post a comment.