Migrating a WordPress site manually can seem challenging, but by following this step-by-step guide, you’ll be able to transfer your site with ease. We’ll go over the entire process of moving your WordPress website from one hosting provider to another using cPanel, covering each step for clarity. This guide will also help optimize your content to rank well on Google for search queries related to WordPress migration.
Step-by-Step Checklist for Manual Migration
Old Host: Preparing the Files and Database
-
Download the
wp-contentFolder- Log in to your old hosting account’s cPanel.
- Open File Manager and navigate to the
public_html(or the root folder where your WordPress files are stored). - Locate the
wp-contentfolder, right-click, and select Compress to create a ZIP file for faster download. - After compressing, click on the ZIP file and select Download to save it to your computer.
-
Copy Database Name and Table Prefix from
wp-config.php- In the same
public_htmlfolder, locate and open thewp-config.phpfile. - Find the following lines and make note of them:
- This information will be useful when setting up the database on your new host.
- In the same
-
Download the Database
- In cPanel, navigate to phpMyAdmin and select the database referenced in
wp-config.php. - Click on Export at the top, choose Quick Export for simplicity, and select SQL format.
- Click Go to download the SQL file to your computer.
- In cPanel, navigate to phpMyAdmin and select the database referenced in
New Host: Setting Up WordPress with Your Old Data
-
Install Fresh WordPress
- Log in to the cPanel on your new hosting account.
- Use Softaculous or any WordPress installer tool provided by your new host to install a fresh WordPress instance.
- Ensure the new installation is set up with the same URL you plan to use for your site.
-
Delete the New
wp-contentFolder- Once the new installation is complete, go to File Manager and locate the
public_html(or root directory). - Delete the new
wp-contentfolder created during installation, as we’ll replace it with the one from your old site.
- Once the new installation is complete, go to File Manager and locate the
-
Upload the Old
wp-contentFolder- Click on Upload in File Manager, and select the
wp-contentZIP file you downloaded from the old host. - Once uploaded, right-click on the ZIP file and choose Extract. This action will replace all plugins, themes, and uploads from the old site.
- Click on Upload in File Manager, and select the
-
Drop the New Database
- Open phpMyAdmin in cPanel.
- Select the new WordPress database and Drop all tables to clear it. This makes room for the tables from your old database.
-
Import the Old Database
- With the database still selected, go to Import and choose the SQL file you downloaded from the old host.
- Click Go to start the import process. After a successful import, you’ll see your old site’s tables in the new database.
-
Update Domain URL in the Database (If Necessary)
- If your site is moving to a new domain, go to the wp_options table in phpMyAdmin.
- Update both
siteurlandhomevalues to reflect the new domain.
-
Update Table Prefix in
wp-config.php- Return to File Manager and open the
wp-config.phpfile in the new site’s root folder. - Update the
$table_prefixvalue to match the prefix from your old site. - This is essential for WordPress to recognize the tables in the new database.
- Return to File Manager and open the
-
Update Old URLs to the New Domain (Optional)
- Log in to your new WordPress admin dashboard.
- Install and activate a plugin such as Better Search Replace or WP Migrate DB to help with URL replacement.
- Run a search-and-replace to change all instances of your old domain to the new one.
Important Considerations
- Testing: After the migration, test your site thoroughly to make sure all links, images, and pages load correctly.
- Permalinks: You may need to re-save the permalink structure in Settings > Permalinks to ensure URL structure is preserved.
- Backup: Always keep a backup of your files and databases before making significant changes.
By following this guide, you should have your WordPress website fully migrated to your new host with minimal downtime. Whether you’re moving to improve site speed, security, or just exploring a new host, these steps will ensure your site functions just as it did on the old server.
