Migrating a website: How to do it correctly and without any risk

In this article we explain how to do the migration of a website in a correct and tested way, and with the least possible number of risks, because it’a a delicate procedure in which mistakes and oversights that are paid dearly.

In fact the migration, depending on the objectives: change of host, domain name, unification of contents, graphic restyling, etc., can turn out to be much more complex than one thinks, because it requires a series of technical steps, pre-and post migration, such as creating a backup copy of the site, analyzing and mapping the site pages, redirects, and many other operations, as well as subsequent tests to verify that everything works.

There are tools to do some of these steps, of course, but it is necessary to know how to do an analysis before automating the processes, and to know which tool to use during the different phases. It’s not always so simple to orchestrate everything for those who have never done it or for those who have to manage a large site with a complex architecture.

The successful migration of a website also requires close attention to SEO issues, to avoid losing search engine rankings and organic traffic. All it takes is an oversight in URL management to redirect old pages to new URLs, to screw up months or years of work.

That’s why, often, those who don’t know how to deal with these procedures entrust them to webmasters and SEO specialists. A guide that sheds light on the necessary operations is certainly a good starting point.

When migrate your site

The reasons for migrating are different and can concern the website, the blog, the e-commerce. In all these cases, movements and redirection operations are necessary. However, the term migration can have different meanings and interpretations, it can concern

moving from one host to another, a modification/refresh of the contents with the change of the URLs, the design, the menu, the CMS platform or the website domain.

  • moving the entire website to a new server, to a different hosting platform or CMS
  • the change of the domain name or that of the TLD – Top-Level Domain, or the top-level domain of a web address: “.com”, “.org” or “.net”. which may have to become “.it” for Italy, etc.
  • modifying the site architecture, navigation or permalink structure of the blog
  • changing URLs from HTTP to HTTPS (security protocol)
  • the transition from the mobile version to the responsive one
  • review of contents, refresh, elimination and merging (pages must be redirected to pages created from scratch or to similar ones already present).

Among the elements to be migrated, the pages with the positioned contents, the metadata (title and description), the alt tag of the images, the files that are used to optimize the site, improve its indexing, the structure and positioning, then the Sitemap.xml, the Robots.txt file and the structured data, the HTACCESS file, the configuration file used on the Apache web server to specify the server configuration rules and access to web resources.

All the most important steps to take (checklist)

The migration process changes depending on the reasons and the number of changes. However, some steps apply to everyone and in any case.

Plan for site migration

Plan in advance the technical procedures to be done and the period in which to make the migration, avoiding the busiest moments of the year in which this change could affect visits and/or conversions

Make a backup of the website

Backup allows you to go back to the original version if needed.

Here’s how to do it:

  • Server Backup Tools: Most web hosting services offer built-in backup tools to create a backup of your website.
  • Third-party backup software: There are many third-party backup software to create a backup of your website, including Acronis True Image, EaseUS Todo Backup and Backup4all.

Compatibility with the new server

This means that all website components, such as files, libraries, applications and settings, must be compatible with the new server specifications.

If your new server uses a different version of the operating system or hosting software than your previous server, you may need to make changes to your website to ensure compatibility with your new server.

And yet, if your new server has different system requirements than your old one, such as increased memory or processing resources, you may need to make some website changes to ensure it works properly.

SEO analysis of the site before migration

The SEO analysis is useful for mapping all the contents present, in case you want to change the URLs to see what to leave, what to redirect and what to eliminate, identifying all the pages to prioritize because they get more traffic and convert more.

You can use Google Search Console, or tools like AHrefs, Semrush, SEOZoom, Moz Pro or Screaming Frog.

Set up a 301 redirect (permanent move)

The redirect is used in various cases, for example if you want to move the site to a new domain or switch to HTTPS or even modify the single pages that host resources and contents.


It is advisable to redirect each URL to the new page or one with similar content. If a page dealing with a similar topic does not exist, it is preferable to return a 410 code.

The redirection of an old URL to the new URL is essential on the SEO side, to avoid of losing traffic and penalizing the positioning of any backlinks connected to old URLs.

We’ll talk about it shortly, in a dedicated paragraph.

Run pre-launch tests

Pre-launch testing is essential to see if the links are working properly.

This operation can be done in staging environments created with different methods:

  • Plugins for WordPress: WP Staging or Duplicator.
  • Web Development Tools: WampServer, XAMPP or MAMP to create a local test environment on your computer.
  • Virtualization tools: VirtualBox or VMware to create a test environment without affecting the main operating system.

Make sure the site is mobile-friendly and loads quickly

In general, but even more so if graphic changes have been made, it is essential to check that the site is responsive and that the pages load quickly (according to the parameters dictated by the Core Web Vitals).

The tools to do these checks:

  1. Google PageSpeed Insights: This Google tool analyzes your website and provides a score on loading speed for both desktop and mobile, plus tips on how to improve loading speed.
  2. GTmetrix – This tool analyzes the loading speed of your website, provides a score and suggestions on how to improve performance.
  3. Pingdom – This tool allows you to test the loading speed of your website from different servers around the world and provides a complete overview of the performance of your site.
  4. Google’s Mobile-Friendly Test – This tool lets you check whether your website is mobile-friendly and provides you with suggestions on how to improve its compatibility with mobile devices.

Check for broken links or 404 errors

We will talk about it shortly in the dedicated paragraph, but to anticipate something very intuitive, it is good to make sure that there are no not found pages (404).

Update links in Google Analytics

Make sure analytics are set up in the Google Analytics analytics tool to track all actions once the new site goes live.

Update the Robots.txt file and Sitemap.xml

The Robots.txt file is the text file that informs search engines which pages on your website can be indexed and which are not.

To edit the Robot.txt file, access the site folders via FTP or from the host’s control panel, search for the Robots.txt file in the root of the website to edit it with a text editor such as Notepad or TextEdit inserting the blocking or permission instructions for the pages to be inhibited or made accessible. Save the file and upload it to the website.

To update the Sitemap.xml file, the list of all website pages that you want to be indexed by search engines, you need to follow these steps:

  • Create a new website map or update your existing website map (you can do this with free online tools or with the plugin Yoast). In the case of the Yoast plugin with WordPress, the sitemap is generated automatically and you just need to enter the URL in Google Search Console to send it to Google.
  • Manual operation: Access website via an FTP client or from the hosting control panel.
  • Find the sitemap.xml file and overwrite it by uploading the new sitemap.xml file.
  • Submit the new file to search engines using Google Search Console with the “Submit Sitemap” function.

Update the data in Google Search Console and check the indexing of web pages.

You can also use the site:websitename operator in Google to check for pages to appear in the search engine.

How to do site migration (operational side)

In addition to the strategic aspect and the recommended steps to ensure that everything is done correctly, we have to do some technical operations that can be assisted by the hosting provider itself, or we can do with a plugin for the migration of a site or blog in WordPress or with a FTP client.

File transfer from old to new hosting environment

To transfer website files from old to new hosting environment or platform, you can use different tools, such as

  • a FTP protocol (File Transfer Protocol)
  • or the file management console of the new environment, i.e. the hosting file manager which allows you to carry out all the website file management operations within the control panel, where you can manage the your account, web services, site files, and everything in between.

Warning: Before making the transfer, it is important to check that the file permissions are set correctly and that there are no errors or conflicts between file or folder names. After the transfer, you should verify that the transferred files have been copied correctly.

Generally, from the hosting control panel you can access the “File Management” or “File Manager” section and select the file whose permissions you want to check. Once the file is selected, you should find an option to view and change the file’s permissions.

How to transfer files with FTP

Generally speaking, these are the steps to take:

  • Download an FTP client like FileZilla or Cyberduck, or use an FTP client built into your web development software
  • Login to the FTP client and enter the FTP server address, username and password provided by your hosting provider
  • Connect to the FTP server by clicking the “Connect” button or similar button in the FTP client interface.
  • Once connected to the FTP server, you can view the folder structure of the server in the FTP client window.
  • Select files to transfer from computer to FTP server folder by drag and drop or copy and paste.
  • After selecting the files to transfer, drag or copy and paste them to the destination folder of the FTP server.
  • Once you have completed the file transfer, you can disconnect from the FTP server.

Setting up the new hosting environment

After transferring the files, you need to configure the new hosting environment, i.e. set all the configurations and settings necessary to run the site on the new server, ensuring its correct functioning, security and scalability.

Configuration includes among other operations:

  • install the necessary applications, such as the CMS or the PHP libraries
  • configure system parameters, such as PHP.ini settings
  • set any security settings, such as firewall rules
  • configure the database on the new hosting environment (username, password, host, database name)
  • update the domain’s DNS records to point to the new host.

Once the new environment is configured, it is important to test the website to verify that everything is working properly and that there are no compatibility issues with the applications or plugins used on the site.

Errors that can occur during migration

While migrating a website, a few errors or issues can occur, including:

  1. File Transfer Errors: Connection or transfer errors that can cause some files to be lost or data to be corrupted.
  2. Compatibility issues: If the new hosting environment uses a different version of some tools, such as the operating system, server software or applications, than the old environment.
  1. File Permissions Issues: If permissions are configured incorrectly, there may be login or display errors. You need to set the file and folder permissions correctly for the website to work.
  1. Server configuration errors.
  2. Domain name issues: If your website’s domain name changes during migration, you may need to change your DNS and server configuration settings to ensure your website displays correctly.
  3. 404 pages when the domain name changes and when changes are made to the site structure and the URLs of the individual pages.
  4. Problems with databases: If the website uses a database, there may be problems importing or exporting data.
  5. Safety issues.

To avoid these errors, it’s a good idea to make a backup copy of the site before starting the migration, and then test the website after the migration, to make sure everything is working properly.

Page not Found, the fateful 404 error

La pagina 404 è una delle conseguenze di una procedura scorretta durante lo spostamento delle pagine di un sito web. Se si verifica questo errore, vuol dire che qualcosa è andato storto e che il server non trova la pagina in questione perché, ad esempio, sono stati modificati lo slug dell’URL per un contenuto o è stato eliminato o accorpato un post.

This problem must be discovered and resolved with a page redirection to another (Redirect 301) because the error can affect the authority of the site, not only in the eyes of people who, not finding the page, go elsewhere, but also in the eyes of search engines who want to provide useful and functional pages to people.

When Google, for example, scans a page and finds it in 404, it perceives the technical error as a negative sign of a site that is not maintained competently.

How to check 404 pages?

There are various ways to check for 404 errors

  • in Google Search Console
  • with the Redirection plugin that automatically notifies you of 404 errors.
  • with server-side tools (which can help because they avoid plugin overcrowding)
  • with free online tools or paid third-party tools: Dead Link Checker (free), Xenu (free), with Screaming Frog (free and with PRO version to scan over 500 pages), with some paid software like SemRush , SEOZoom, etc.

Redirect 301 and how to do the redirect

Redirection can be done with the free Redirection plugin or manually with the Redirect htaccess a configuration file used by the Apache web server, which can be done not only to redirect pages to new URLs, but in several cases, including:

  • Redirect from old domain name to new domain name
RewriteEngine on
RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]
RewriteRule ^(.*)$ https://newsite.com/$1 [L,R=301,NC]
  • Redirect from old to new URL
Redirect 301 /old-page.html /new-page.html 
  • HTTP to HTTPS Redirect
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  • non-www to www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
  • www to non-www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301,NC]

Risks of migrating a website

Migrating a website in a wrong way can cause serious damage on the SEO side and beyond: crawling and indexing problems, unavailable content, 404 pages, loss of connection with backlinks, slow loading of pages from mobile, traffic drops resulting in lost conversions. Not to mention the loss of authority in the eyes of people and search engines.

In short, if you are investing in a web project and an online business, it is really crucial to do this migration well. If you have a doubt or need help in the migration, you can always contact Artera technicians, we are here!

Share