Guide to Moving WordPress to a New Domain without Losing SEO

Preparations Prior to WordPress Migration

Moving a WordPress site to a new domain may seem like a challenge, but with the right preparation, you can do it without losing your SEO ranking. Before making any changes, it is essential to make a complete backup of your site. This includes both the files and the database. There are multiple plugins that can facilitate this process, such as UpdraftPlus or Duplicator.

In addition, you must make sure that the new domain is registered and configured correctly. Check that the hosting is ready to receive the new site and that you have access to the control panel of both domains. Don't forget to check the DNS configuration to point correctly to your new server.

File Transfer and Database

The next step involves transferring your WordPress files and database to the new domain. To do this, follow these steps:

Database Export

To export the database, you can use phpMyAdmin, which is available in most hosting control panels. Select your WordPress database and click on the "Export" tab. Make sure to choose the "Quick" method and "SQL" format. This will generate an .sql file that you can import into the new domain.

File Transfer

Use an FTP client like FileZilla to download all the files from your WordPress installation (including wp-content, wp-admin and wp-includes). Then, upload those files to the new domain. Make sure the folder structure is kept intact.

Update the New Domain Configuration

Once you have moved all the files and the database, you will need to make some adjustments to the WordPress configuration on the new domain.

Change Site URL

Access the database of the new domain using phpMyAdmin. Find the `wp_options` table and update the values of `siteurl` and `home` with the new URL. For example:

UPDATE wp_options SET option_value = 'http://nuevodominio.		
Guide to Moving WordPress to a New Domain without Losing SEO
Download our web maintenance guide Free of charge!
Free guide for freelancers and small businesses that want to avoid surprises and improve their web performance.
com' WHERE option_name = 'siteurl'; UPDATE wp_options SET option_value = 'http://nuevodominio.com' WHERE option_name = 'home';

This will ensure that your site points to the new domain correctly.

Update Internal Links

It is crucial that all internal links point to the new domain. To do this, you can use a plugin like Velvet Blues Update URLs or do it manually. Make sure that all links in your posts, pages and menus are updated to avoid 404 errors.

301 Redirect to Preserve SEO

One of the most important steps when moving a website is to set up 301 redirects. This tells search engines that the content has been permanently moved to a new address, which helps preserve your SEO ranking.

Setting Redirects in the .htaccess File

Access the .htaccess file of your old domain and add the following lines of code to redirect all traffic to the new domain:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://nuevodominio.com/$1 [L,R=301]

This will automatically redirect visitors and search engines to the new URL without losing traffic.

Post-Migration Verification

After performing all the above steps, it is essential to verify that everything works correctly in the new domain.

Check Links and Functionality

Browse the site on the new domain and verify that all links work and that the content is displayed correctly. Use tools such as Screaming Frog or Google Search Console to detect possible problems.

Update Google Search Console and Google Analytics

Don't forget to update your site information in Google Search Console and Google Analytics with the new domain. This will allow you to continue monitoring the traffic and SEO performance of your new domain.

Monitoring and Future Adjustments

Finally, it is important that monitor SEO performance of the new domain in the weeks following the migration. Use analytics and SEO tools to make sure there are no significant drops in traffic. If you notice any drops, check for broken links or redirect errors that may have arisen during the migration process.

Remember that domain migration is a process that requires attention to detail and patience. With the right steps, you will be able to move your WordPress site to a new domain without losing SEO rankings and improving the user experience.