How to Transfer a WordPress Site to New Hosting: A Complete Guide

Transferring a WordPress site from one hosting provider to another may seem like a complex task, but with the right procedure and tools, you can migrate safely and without interruption. In this guide, you will find the basic steps to duplicate, transfer and correctly install a WordPress site on a new hosting provider, ensuring that everything works perfectly.

Preparing to transfer your WordPress site

Before starting the migration process, it is essential to configure both the site and the destination hosting correctly. If both the source and destination sites use Cpanel, the procedure will be much simpler.

How to transfer a WordPress site: complete site backup

The first thing to do is to make a complete backup of the site. This includes:​

  • Site files: themes, plugins, media and configuration files.
  • Database: containing all content, settings and users.

Use tools such as phpMyAdmin to export the database and an FTP client (e.g. FileZilla) to download the site files.

Choosing a migration method

There are two main methods for migrating a WordPress site:

  • Manual method: requires technical skills to manage files and databases.
  • Using plugins: simplifies the process, ideal for those who prefer a more guided approach.

Manual WordPress site migration

Manual migration gives you total control over the process, ideal for complex sites or for those who are experienced and prefer not to rely on plugins.

Exporting files and the database

  1. Download the site files: using an FTP client, access the server and download all the files in the site’s main directory (usually public_html or home);
  2. Export the database: access phpMyAdmin, select the site database and use the export function to save an .sql file containing all the tables and data.

Configuring the destination hosting

  1. Upload the site files: using the FTP client, upload all the files previously downloaded from the old hosting to the main directory of the new hosting;
  2. Import the database: access phpMyAdmin on the new hosting, create a new database and import the previously exported .sql file;
  3. Edit the wp-config.php file: update the database credentials in the wp-config.php file to reflect the settings of the new server.

Updating URLs

If, in addition to migrating the site, you have also changed the domain (site name), you will need to update the URLs within the database. Use tools such as Search Replace DB or run SQL queries to replace the old URLs with the new ones. You can find useful guides online on the queries to run.

Migration with dedicated plugins

To facilitate the migration process, there are several plugins (including free versions) that automate many of the necessary operations.

Duplicator (free and paid versions)

Duplicator is one of the most popular plugins for migrating WordPress sites.

  1. Installation: install and activate the plugin on the site to be migrated;
  2. Creating the package: use the package creation function to generate an archive containing all the files and the site database;
  3. Downloading the files: download the generated files (installer.php and the .zip archive);
  4. Uploading to the new hosting: upload both files to the main directory of the new hosting;
  5. Run the installer: go to http://nuovodominio.com/installer.php and follow the instructions to complete the migration;

On very large sites or hosting with limited resources, the free version of Duplicator may not be able to duplicate the site. You will need to use the paid version (which also works very well for creating periodic backups of the site).

Other plugins for duplicating WordPress sites

  • All-in-One WP Migration: offers a simple solution for exporting and importing WordPress sites.
  • UpdraftPlus: in addition to backup, it allows migration between sites.
  • WP Migrate DB: useful for exporting the database with URL replacement options.

Post-migration verification and configuration

After completing the migration, it is essential to verify that the site is working correctly.

Site check

  • Navigation: make sure that all pages are accessible and that links lead to the relevant pages;
  • Media: check that all images and multimedia files are present and displayed correctly;
  • Plugins and themes: check that all plugins and themes are active and working;

Updating permalinks (page addresses)

Log in to the WordPress admin panel, go to Settings > Permalinks and save the settings to regenerate the URL rewrite rules.

Configuring the hosts file (optional)

To test the site on the new hosting before updating the DNS, edit your computer’s hosts file to point the domain to the new server.

Just write a new line in the file where you will first enter the IP address of the new hosting and then, separated by a space, your site’s domain. This will temporarily ‘trick’ your browser into going to the new hosting instead of following the path on the old hosting (even if the domain does not yet point to the new hosting).

Updating the domain’s DNS

Once you have verified that the site is working correctly on the new hosting, it is time to update the domain’s DNS records.

Modifying DNS records

Access the domain management panel at the registrar (where you purchased the domain) and update the DNS records to point to the new server.

With Hostingfy, if you have purchased a hosting+domain package, we will take care of this for you.

DNS propagation: timing and how it works

After updating the DNS records, a process called DNS propagation begins, which is the dissemination of the new domain information across the global network of DNS servers.

  • Propagation times: these can vary from a few hours to 48 hours, depending on the DNS provider and the cache of individual devices or Internet providers or the domain’s TLD (extension);
  • How to monitor propagation: you can use free online tools such as DNS Checker or Whatsmydns.net to check the status of DNS propagation;

During this period:

  • Some users may still see the old site, while others may already see the new one.
  • Avoid making any major changes until propagation is complete to avoid having data that is not aligned between the old and new hosting.

Post-migration optimisations

Once the migration and DNS propagation are complete, it is advisable to perform some optimisations to ensure maximum efficiency of the site on the new hosting.

Database cleaning and security check

After a migration, it is a good idea to perform a site integrity check:

  • Database cleaning: use plugins such as WP-Optimize to delete obsolete data, unnecessary revisions and tables left behind by uninstalled plugins;
  • Security: install plugins such as Wordfence or iThemes Security to protect your site from any vulnerabilities arising from the migration;

Performance optimisation

Check your site’s performance on the new server:

  • Caching: configure a plugin such as W3 Total Cache or WP Rocket to speed up page loading and thus improve user experience and SEO performance;
  • Image compression: tools such as Smush or ShortPixel help reduce image size without losing quality, making navigation smoother and more enjoyable;
  • Check your site with tools such as PageSpeed Insights or GTmetrix: to identify any bottlenecks in the functioning and loading of pages.

Some tips for a smooth WordPress migration

Transferring a WordPress site can hide unpredictable difficulties. Here are some professional tips to minimise risks and optimise the process:

  • If possible, don’t delete the site from the old hosting provider immediately: keep the old space active for at least a week after the migration, in case you need any files or emergency backups;
  • Disable maintenance mode only after testing everything thoroughly;
  • Check the .htaccess file: sometimes, during migration, it gets overwritten or is missing altogether. Recreate the permalinks and make sure the rules are correct to avoid navigation errors;
  • Check the server configuration files, such as php.ini and .user.ini, especially if your site uses advanced features such as high memory limits, opcache or large file uploads.
  • Update any external services: if you use CDNs such as Cloudflare, make sure you also update the DNS pointing and caches there.

Transferring a WordPress site from one hosting provider to another is a simple operation, but it requires attention, precision and good planning. Whether you choose to do it manually or with a plugin, the important thing is to follow a proven procedure that includes: backup, file and database migration, content verification, DNS update and final testing.

With this guide, you have all the tools you need for a secure WordPress migration, without any site downtime or data loss.

If you have any doubts, know that here at Hostingfy, you don’t have to worry, because the Hostingfy team will take care of your WordPress site migration, so you can focus on your business.

Table of Contents