Moving a WordPress Blog from one host to another

If your web host’s service doesn’t meet your expectations, transitioning to another host is a viable option. There are several ways to move your WordPress website from one host to another, each with its own pros and cons:

Manual Methods:

  1. FTP upload: This is a technical approach and requires knowledge of FTP clients and database management. This FTP method involves manual file transfer and database import/export. It’s suitable for users comfortable with FTP and offers more control over the migration process. Before starting WordPress website migration, make sure you can access old and new hosting accounts using FTP using FTP client software such as FileZilla.
    • Backup Your WordPress Site: Connect to your old hosting account through FTP and retrieve all files from the WordPress root directory to your local computer.
    • Export MySQL Database: Log in to your old hosting account’s cPanel and access phpMyAdmin to export the WordPress database. Save the exported SQL file on your local computer.
    • Access New Hosting Account: Utilize FileZilla to connect to the FTP account of the new hosting provider.
    • Upload Files to the New Host: Utilize FileZilla to connect to the FTP account of the new hosting provider. Navigate to the root directory (public_html or www) on the new host. Upload all the files from your local computer to the new host.
    • Create a New MySQL Database: Log in to the new hosting account’s cPanel and create a new MySQL database and user. Assign the user to the database and grant necessary privileges.
    • Import MySQL Database: Access phpMyAdmin on the new host. Select the newly created database and import the SQL file exported earlier from the old hosting provider.
    • Update wp-config.php: Locate the “wp-config.php” file in the root directory of your WordPress installation on the new host. Update the database name, username, password, and host details with the new values. Edit the following lines to match the new database name, username, and password:
      • define('DB_NAME', 'new_database_name');
      • define('DB_USER', 'new_database_username');
      • define('DB_PASSWORD', 'new_database_password');
    • Test Your Site: Visit your new domain to ensure that the WordPress site is working correctly.
    • If the domain is changing (Skip this step if the domain is not changing): There are some additional steps if the domain is also changing after the migration of WordPress. After completing the initial steps of moving files using FTP, you’ll need to update the site URLs in the WordPress database to reflect the domain change.
      • Access the WordPress Database: Log in to the phpMyAdmin tool on the new hosting account and select the database associated with your WordPress site.
      • Update Site URLs: Look for the wp_options table in the database. Find the rows with the option_name values siteurl and home. Click on the pencil/edit icon to modify these rows. Replace the old domain with the new domain in the option_value field. Save the changes.
      • Update URLs in Content: In some cases, URLs may be hardcoded in post/page content and other settings. Run SQL queries to update these URLs. Execute the following queries:
        • UPDATE wp_posts SET post_content = REPLACE(post_content, ‘’, ‘’);
        • UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ‘’, ‘’);
      • Check and Update Permalinks: Go to the WordPress admin dashboard of the new site. Navigate to Settings > Permalinks and click “Save Changes” to update permalinks.
      • Clear Browser and WordPress Cache: Clear your browser cache to ensure you’re viewing the latest version of your site. If you use any caching plugins on WordPress, clear or deactivate them temporarily.
      • Test Your Site: Visit the new domain in your browser to check if the site is loading correctly. Ensure all links, images, and resources are pointing to the new domain.
    • Update DNS Settings: After completing the domain change-related steps and confirming that your WordPress site is working correctly on the new hosting provider, you can proceed to update the DNS settings. This step is necessary to point the domain to the new hosting server.
      • Retrieve Name Server Information: Log in to the new hosting account and find the name server information provided by the hosting provider.
      • Access Domain Registrar: Log in to the account with the domain registrar where your domain is registered (e.g., GoDaddy, Namecheap).
      • Update Name Servers: Locate the DNS or Name Server settings in your domain registrar account. Replace the existing name servers with the new ones provided by your new hosting provider. Save the changes.
      • Propagation Time: DNS changes may take some time to propagate across the internet. This process is known as DNS propagation. It can take up to 48 hours, but usually, changes start reflecting within a few hours.
      • Verify DNS Propagation: Use online tools like “DNS Checker” to verify that the DNS changes have propagated. Once the propagation is complete, your domain will point to the new hosting server. The process of migrating your WordPress website is now complete.
  2. WordPress export/import: Use the WordPress export/import tools to extract your website content and settings as a file, then import it into your new WordPress installation. This is easier than the FTP method but can be limited to small sites. In this method, relocating a WordPress blog to a different hosting provider doesn’t require extensive expertise, thanks to WordPress’s built-in features. The platform offers an “export and import” option, streamlining the process of moving your blog. Follow the steps below to seamlessly transfer your blog from one location to another.
    • Backup Your WordPress Site: Log in to the WordPress admin dashboard of your old site. Navigate to Tools > Export. Choose the content you want to export (All content, Posts, Pages, etc.) and click “Download Export File.” Save the exported XML file on your local computer.
    • Set Up the New Hosting Account: Sign up for a new hosting account with your preferred provider. Obtain FTP credentials for the new hosting account.
    • Install WordPress on the New Host: Install WordPress on the new hosting account using the provided installer or manual installation. Create a new database and user during the installation process.
    • Upload Files to the New Host: Connect to the new hosting account using an FTP client (e.g., FileZilla). Navigate to the root directory (public_html or www) on the new host. Utilize any FTP client for transferring themes and plugins from the old host to the new host. You can replace everything except the crucial “wp-config.php” file containing fundamental settings for your new website. The “wp-config.php” file should stay in the root folder where WordPress is installed. Activate the relevant theme and plugins in the new location. While not obligatory, you have the option to duplicate the entire “wp-content” using an FTP client. You may first need to download these files locally from the old host using FTP before uploading them to a new host.
    • Import XML File on the New Site: Log in to the WordPress admin dashboard of your new site. Navigate to Tools > Import. If you haven’t installed the WordPress Importer plugin, you’ll be prompted to install and activate it. Choose the WordPress option and upload the previously exported XML file. Assign content to an existing user or create a new user. Click “Submit” and wait for the import to complete.
    • Update Permalinks and Settings: Go to Settings > Permalinks in the new WordPress admin. Choose your preferred permalink structure and click “Save Changes.” Review and update other settings if necessary.
    • Test Your Site: Visit your new domain to ensure that the WordPress site is working correctly. Check various pages, posts, and functionalities to confirm everything is functioning as expected.
    • Update DNS Settings: If the domain is changing, update the DNS settings with the new hosting provider’s name servers. Monitor DNS propagation, which may take up to 48 hours.
    • Note: The above method doesn’t move the contents of additional WordPress sites installed in subdomains and subfolders of the main domain. If you have any subdirectories and subdomains for your blog (main domain), then you have to repeat the above steps for them as well. For instances where a different content management system is installed in the subfolders or subdomains, adhere to the appropriate method for that particular software. However, if WordPress is installed anywhere, the provided method can be applied. Of course, a new WordPress installation is a prerequisite before commencing the process on the new domain.
    • Note: The above method works very well if you want to change the web host. However, if you want to move the WordPress site to the new domain then internal links to pages and references to images are not updated and the permalinks or URLs embedded in the content will not work. To solve this issue you can download and activate the “Velvet Blues Update URLs” plugin (or use the little complicated method mentioned above using phpmyadmin).  After activation of this plugin, simply enter your old domain URL and the new one.  It will change everything within seconds. This plugin is also very important if you are maintaining a cloned copy of your website on your personal computer (which you should always do to prevent mishaps and getting everything lost) using software like XAMPP (Windows PC) and LAMPP (Linux PC). Additionally, you should also update your feed URL and modify the PPC destination URL if using advertising with AdWords, Yahoo, and others.
  3. Using cPanel:
    • Many hosting providers offer cPanel with a built-in migration tool. Generate a full backup of the website on the old host. Restore the backup on the new host.
  4. SSH and WP-CLI:
    • If both hosts support SSH and WP-CLI, you can use command-line tools. Export the database and transfer files using SCP or SFTP. Import the database and update configurations.
  5. Git Version Control:
    • Use Git to version control your WordPress site. Clone the repository to the new host. Export/import the database and update configurations.

Plugin-assisted Methods:

  1. WordPress Migration plugins: Plugins like Duplicator Pro, All-in-One WP Migration, Migrate Gur, and UpdraftPlus streamline the migration process by creating a complete backup of your WordPress site and transferring it to your new host. Install the plugin on both the old and new WordPress sites. Export from the old site and import on the new site. These options are user-friendly but generally require premium versions to use all functionality.

Service-based Methods:

  1. Managed WordPress hosting providers: Many managed WordPress hosting providers offer free or paid website migration services as part of their plans. This is the most hassle-free approach but may be more expensive. I always got help from them during my website migration.
  2. Third-party migration services: Dedicated migration services like Migrate Guru or CodeGuard can handle the entire migration process for a fee. This is a good option if you lack technical expertise or have a complex website.

Now enjoy, you have successfully cloned the new WordPress website with the contents and look of the old one. HAPPY BLOGGING.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top