Migrating a WordPress website to a new domain involves more than just moving files. It includes updating URLs throughout the site to ensure everything functions correctly under the new domain. Here’s a comprehensive guide to help you through the process.

Migrating a website to a new domain can be a significant undertaking, but it is often necessary for various reasons. Here are some common scenarios that might necessitate a domain migration:

1. Rebranding

Business Name Change

If a company undergoes a rebranding that includes a new name, updating the domain to reflect the new brand is essential for consistency and brand recognition.

Market Positioning

A new domain can better align with a company’s target market or industry positioning, making it more memorable and relevant to potential customers.

2. SEO and Keywords

Better SEO Opportunities

A new domain might be more keyword-rich, helping improve search engine rankings and organic traffic.

Previous Domain Penalties

If the current domain has been penalized by search engines for any reason (such as spammy backlinks or past unethical practices), moving to a new domain can provide a clean slate.

3. Expansion and Diversification

International Expansion

A business expanding into new international markets might benefit from a country-specific domain (e.g., .co.uk for the UK or .de for Germany) to appeal to local customers.

New Products or Services

If a business diversifies its offerings significantly, a new domain that encompasses the broader range of products or services might be more appropriate.

4. Domain Issues

Trademark Conflicts

If the current domain infringes on someone else’s trademark, migrating to a new, legally compliant domain is necessary to avoid legal issues.

Domain Acquisition

A more desirable or brandable domain becomes available for purchase, offering a better fit for the business’s long-term goals.

5. Security Concerns

Compromised Domain

If the current domain has been compromised or associated with malware or phishing attacks, moving to a new domain can help rebuild trust and security.

6. Simplification and Usability

User-Friendly URL

A new domain that is easier to spell, remember, or type can improve user experience and accessibility.

Shorter URL

Shorter URLs are often easier for users to remember and share, particularly on social media and marketing materials.

7. Mergers and Acquisitions

Corporate Mergers

When companies merge, a new domain might be chosen to reflect the unified brand identity.

Acquisition Integration

If a company acquires another, integrating the acquired business under a new domain might streamline operations and branding.

8. Marketing Campaigns

Campaign-Specific Domains

Sometimes, businesses create separate domains for specific marketing campaigns to track performance more accurately and target specific audience segments.

9. Technical Reasons

Improved Hosting and Performance

A new domain might be tied to a better hosting provider, offering improved website performance, speed, and uptime.

Platform Transition

Migrating to a new domain might coincide with moving to a new CMS (Content Management System) or a new technology stack that better supports the business’s needs.

Conclusion

Migrating a website to a new domain can be a complex process, but it is often necessary to align with business goals, improve SEO, address legal or security concerns, and enhance user experience. Careful planning and execution are crucial to ensure a smooth transition and maintain or improve the website’s search engine rankings and traffic.

WordPress Migration to a new domain steps

Step 1: Backup Your Website

Manual Backup

  1. Backup Files: Use an FTP client like FileZilla to download all your WordPress files.
    • Connect to your hosting server using FTP.
    • Navigate to the root directory of your WordPress installation.
    • Download all files and folders to your local computer.
  2. Backup Database: Access your hosting control panel (like cPanel) and use phpMyAdmin to export your WordPress database.
    • Open phpMyAdmin.
    • Select your WordPress database.
    • Click on the “Export” tab.
    • Choose “Quick” export method and click “Go” to download the .sql file.

Plugin Backup

Alternatively, you can use a plugin like UpdraftPlus or Duplicator to create a complete backup of your site.

Step 2: Set Up the New Domain

  1. Add Your New Domain: Log into your hosting account and add the new domain. This process involves adding the domain to your hosting control panel.
  2. Upload Files: Use FTP to upload the files you backed up to the new domain’s root directory.
    • Connect to your host using FTP.
    • Navigate to the root directory of your new domain.
    • Upload all the files you downloaded from your old domain.
  3. Create a New Database: If you are using a new database, create one in your hosting control panel.
    • Go to the MySQL Databases section.
    • Create a new database and a user associated with it.
    • Note down the database name, username, and password.
  4. Import Database: Use phpMyAdmin on your host to import the .sql file you exported.
    • Open phpMyAdmin.
    • Select the newly created database.
    • Click on the “Import” tab.
    • Choose the .sql file and click “Go” to import.

Step 3: Update wp-config.php

  1. Edit wp-config.php: Locate the wp-config.php file in your WordPress root directory and edit it to reflect the new database details if they have changed.
    • Update the database name: define('DB_NAME', 'new_database_name');
    • Update the database user: define('DB_USER', 'new_username');
    • Update the database password: define('DB_PASSWORD', 'new_password');
    • Update the database host if different from localhost: define('DB_HOST', 'new_host');

Step 4: Update URLs in the Database

Use a Plugin

Using a plugin like “Better Search Replace” can simplify this process.

  1. Install and Activate the Plugin: Go to your WordPress dashboard, navigate to Plugins > Add New, search for “Better Search Replace,” install, and activate it.
  2. Run the Search and Replace:
    • Go to Tools > Better Search Replace.
    • In the “Search for” field, enter your old domain (e.g., http://old-domain.com).
    • In the “Replace with” field, enter your new domain (e.g., http://new-domain.com).
    • Select all tables.
    • Check “Run as dry run?” to preview changes. Uncheck this box to make changes.
    • Click “Run Search/Replace.”

Manual Method

Alternatively, you can update URLs manually via phpMyAdmin.

  1. Open phpMyAdmin: Access your hosting control panel and open phpMyAdmin.
  2. Select Database: Select your WordPress database.
  3. Run SQL Queries:
    • Replace URLs in the posts and postmeta tables:
      sql UPDATE wp_options SET option_value = replace(option_value, 'http://old-domain.com', 'http://new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://old-domain.com','http://new-domain.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://old-domain.com', 'http://new-domain.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://old-domain.com','http://new-domain.com');

Step 5: Update DNS Settings

  1. Change DNS Settings: Update your domain’s DNS settings to point to the new host.
    • Log in to your domain registrar.
    • Find the DNS settings or nameserver settings.
    • Replace the old nameservers with the new ones provided by your new host.
    • Save the changes and wait for the DNS propagation, which can take up to 48 hours.

Step 6: Test Your Website

After DNS propagation, test your website to ensure everything is working correctly under the new domain. Check for broken links, missing images, and functionality of all plugins and themes.

Step 7: Set Up 301 Redirects

To maintain SEO rankings and ensure users who visit the old domain are redirected to the new domain, set up 301 redirects.

  1. Edit .htaccess File: Access the .htaccess file in the root directory of your old domain using FTP.
  2. Add Redirect Rules:
    apache # BEGIN 301 Redirects RewriteEngine On RewriteCond %{HTTP_HOST} ^old-domain.com [NC] RewriteRule ^(.*)$ http://new-domain.com/$1 [L,R=301] # END 301 Redirects

Step 8: Notify Search Engines

Google Search Console

  1. Add New Domain: Log in to Google Search Console and add your new domain.
  2. Submit Sitemap: Submit a new sitemap for your new domain to help Google index your new site quickly.

Bing Webmaster Tools

  1. Add New Domain: Log in to Bing Webmaster Tools and add your new domain.
  2. Submit Sitemap: Submit a new sitemap for your new domain.

Step 9: Final Checks and Cleanup

  1. Permalinks: Go to your WordPress dashboard, navigate to Settings > Permalinks, and re-save the permalinks structure to ensure proper functioning.
  2. Update Links: If your new domain has a different structure, update any hard-coded links in your content.
  3. Delete Backup Files: Remove any backup files or migration plugins from your server for security reasons.

By following these steps, you can successfully migrate your WordPress website to a new domain with minimal downtime and disruption.

Do you need assistance to migrate your WordPress website to a new domain?

Leave your information below and we will contact you
Contact US
Submit your details below. We will contact you shortly to understand your requirements.
Please enable JavaScript in your browser to complete this form.
Products of Interest

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.