How to Manually Migrate a WordPress Site (2024 Guide)

Kleverway WordPress Website Development Company in Bangalore

Migrating a WordPress site manually can seem daunting, but with the right steps and attention to detail, it becomes a manageable process. Whether you’re switching to a new host or relocating your site to a different domain, this comprehensive guide will walk you through the essential steps. Follow these instructions carefully to ensure a smooth and error-free migration.

If you need professional assistance, consider working with a reliable WordPress Website Development Company in Bangalore, like Kleverway. Their team of experts can help with seamless migrations, custom WordPress solutions, and ongoing maintenance to keep your site secure and fully functional.

Step 1: Back Up Your Existing WordPress Site

How to Manually Migrate a WordPress Site (2024 Guide)
Kleverway WordPress Website Development Company in Bangalore

Before starting the migration process, it is crucial to create a full backup of your site. This includes both the files and the database.

Backing Up Files

  1. Use an FTP Client like FileZilla to connect to your website’s server.

  2. Navigate to your WordPress root directory, usually named public_html or www.

  3. Download all the files to your local computer. Ensure the .htaccess file is included by enabling hidden files in your FTP client.

Exporting the Database

  1. Log in to your cPanel or web hosting dashboard.

  2. Open phpMyAdmin and select your WordPress database.

  3. Click on the Export tab and choose the Quick method with the SQL format.

  4. Download the exported .sql file and store it securely.

Step 2: Prepare the New Hosting Environment

To successfully migrate your WordPress site, your new hosting environment should be ready for the transfer.

Set Up the Database

  1. Log in to the new host’s control panel.

  2. Go to MySQL Databases and create a new database.

  3. Note down the database name, username, and password, as you’ll need them later.

Upload WordPress Files

  1. Use an FTP client to upload the files you downloaded from your old site to the new server’s root directory.

  2. Ensure the file structure mirrors the original site.

Step 3: Import the Database

Kleverway WordPress Website Development Company in Bangalore
Website Maintenance Company in Bangalore

Using phpMyAdmin

  1. Access phpMyAdmin on the new server.

  2. Select the newly created database.

  3. Go to the Import tab and upload the .sql file you exported earlier.

  4. Click Go to start the import process.

Step 4: Update the wp-config.php File

The wp-config.php file connects your WordPress installation to the database. After importing the database, update this file to reflect the new credentials.

  1. Locate the wp-config.php file in your WordPress root directory.

  2.  Open it in a text editor and modify the following lines:

    define(‘DB_NAME’, ‘new_database_name’);

define(‘DB_USER’, ‘new_database_user’);

define(‘DB_PASSWORD’, ‘new_database_password’)

  1.  Save the changes and re-upload the file to the server.

Step 5: Update URLs in the Database

If you’re changing the domain name during migration, you’ll need to update all references to the old URL in the database.

Using SQL Queries

  1. Access phpMyAdmin and select your database.

Open the SQL tab and run the following commands:

UPDATE wp_options SET option_value = ‘http://newsite.com’ WHERE option_name = ‘siteurl’;

UPDATE wp_options SET option_value = ‘http://newsite.com’ WHERE option_name = ‘home’;

  1. Replace http://newsite.com with your new domain.

Search and Replace

For more extensive URL updates (e.g., media links), use a plugin like Better Search Replace after migration.

Step 6: Test Your Site on the New Server

Before making your site live, test it thoroughly to ensure everything works as expected.

  1. Edit the Hosts File on your computer to preview the site without changing the DNS:
    • Add a line mapping your domain to the new server’s IP address.

    • Example: 123.123.123.123 yourdomain.com.

  2. Open your browser and navigate to your site. Check for broken links, missing files, or database errors.

Step 7: Update DNS Settings

Website Maintenance Company in Bangalore
Website Maintenance Company in Bangalore

Once you’re satisfied with the migration, update the DNS settings to point your domain to the new server.

  1. Log in to your domain registrar.

  2. Locate the DNS settings for your domain.

  3. Update the A Record to the new server’s IP address.

  4. Allow 24-48 hours for DNS propagation.

Step 8: Final Checks

After the DNS changes take effect, perform these final checks to ensure everything runs smoothly:

  • Test all pages, forms, and functionalities.

  • Check for any missing media files or broken links.

  • Confirm SSL is active (if applicable).

Troubleshooting Common Issues

Database Connection Error

  • Double-check the database credentials in wp-config.php.

  • Ensure the new database user has adequate privileges.

Permalinks Not Working

  • Go to WordPress Settings > Permalinks and click Save to regenerate the .htaccess file.

White Screen of Death

Enable debugging in the wp-config.php file by setting:

define(‘WP_DEBUG’, true);

Migrating a WordPress site manually requires meticulous planning and execution. By following this step-by-step guide, you can ensure a seamless transition without any data loss or downtime. However, managing a migration can be complex, especially for larger websites with dynamic content. To make the process smoother and error-free, consider partnering with a trusted Website Maintenance Company in Bangalore, like Kleverway.

Their team of experts specializes in website migrations, ensuring your site remains secure, optimized, and fully functional during and after the transition. Save time and avoid potential issues by relying on professional support for all your website maintenance needs.