FastCow Hosting
FastCow Hosting
Call us - 0203 026 7866
Client Area

How to Move Or Migrate WordPress Website to New Host

Shameen S
Last updated:
August 20, 2024
transfer wordpress site to new hosting

Are you having issues with your current hosting provider and wish to transfer your WordPress site to a new hosting? Or have you found a better alternative and now you wish to make a switch?

Migrating a WordPress site to a new host is no rocket science. With just the right guide, you can easily migrate any WordPress to a new host without any issues.

Reasons You May Want to Move Your WordPress Site

There are various reasons why you may want to move your WordPress site to another hosting provider.

  • Perhaps your WordPress site is experiencing slow loading speed, or regular downtimes and server crashes.
  • Perhaps the renewal cost of your current hosting is above your budget or you uncovered hidden fees.
  • Perhaps your site is being exposed to vulnerabilities or your hosting provider lacks the infrastructure that your site needs.
  • Perhaps your site needs more features and resources than your hosting provider can provide.

Whatever your reasons, this article will show you the best ways by which you can transfer your WordPress site from your current hosting to a new hosting without losing data and with minimal downtime.

What to do Before you Migrate your WordPress Site to a New Host

Preparation is of the utmost importance if you are considering transferring a WordPress site to another host. Irrespective of the approach you choose to migrate a WordPress site to a new host, you need to have a plan and backup to minimize risks and downtime and ensure a smooth migration process.

Step 1: Choose Your New Hosting Provider

The first thing you need to do before you can transfer your WordPress to another host is to find a new, reliable hosting provider, that has the best infrastructure for your site and is within your budget.

Then you need to choose the right hosting plan and make its payment. There are a couple of hosting plans that are suitable for WordPress sites. They include:

  1. Shared Hosting

Shared hosting is a type of hosting in which many websites are hosted on one server and share the same resources equally. Sometimes each site is allocated a finite storage and bandwidth usage size on the server, e.g. 5GB storage with 20GB bandwidth. Other times, they are provided with “unlimited” storage and bandwidth. Unlimited in this context actually means unrestricted usage as there's no such a thing as servers with unlimited storage and RAM.

  1. VPS Hosting

VPS hosting is a special and more expensive form of shared hosting in that whole shared hosting houses many websites per server, VPS hosting houses fewer sites. So your website has more resources and better performance because it's not sharing the server's finite resources with so many other sites.

  1. Dedicated Hosting

Dedicated hosting is a type of hosting where you rent out the whole server at a high price for your website. Meaning, your website has full ownership of the server resources and better performance than VPS hosting as there is no other website on the server.

  1. Managed WordPress Hosting

Managed WordPress hosting is a recent and special type of hosting specifically designed for WordPress sites. It is hosting combined with active hands-on maintenance services. Managed WordPress hosting is optimized for better WordPress site performance, storage, and security against vulnerabilities. It has tier-based pricing options that are affordable and scalable, ensuring its ability to support all types and sizes of WordPress sites.

Step 2: Clean up your WordPress Site

After choosing your new hosting provider and hosting plan, the next step is to clean up your WordPress site.

While this is not compulsory, it is beneficial to you in that removing unnecessary data from your database and unwanted media files, themes, and plugins will make your site database less congested and your site size minimal.

Although risks are minimal, you are advised to back up your site first before cleaning it.

The easiest part, which is usually the first thing to do when cleaning a WordPress site, is to uninstall and delete the plugins and themes that you do not need. Then, do the same for media files that are unnecessary, especially large-sized media files.

Then comes the less easy part, the cleaning of your database. This is a bit tricky but luckily for us, there are WordPress plugins that can help us clean WordPress databases without breaking your site. For this guide, let's use the Advanced Database Cleaner plugin.

You can install and activate the Advanced Database Cleaner plugin from the WordPress plugin directory directly from your site.

From your dashboard sidebar, click WP DB Cleaner. Bulk select all the elements to clean from your database, and apply the Clean action.

WP Database cleanup tool

Now that your WordPress site database and folder are cleaned, your site is now in the best state for the migration.

Step 3: Deactivate Cache and Security Plugins

Cache and security plugins like WordFence tend to alter your WordPress site structure, .htaccess file, and database in some ways. If they are not deactivated, they may end up causing errors when transferring a WordPress site to another host.

Deactivating them will restore the default WordPress state and structure for a hassle-free migration. You can always have them reactivated after the site’s migration.

Step 4: Backup your WordPress Site

After cleaning your site and confirming it's in good condition, you are ready to initiate the site migration process. But before making any move you need to first backup your site.

You can backup your WordPress site locally by downloading the database and files from your hosting cPanel to your computer. You can also backup your site locally or remotely by saving it with the aid of a WordPress backup plugin like UpdraftPlus and Duplicator to your computer or remote storage.

Step 5: Initiate the Migration Process

You can then proceed to migrate your WordPress website to the new host with any of the methods described in the rest of this guide.

How to Migrate WordPress Site to a New Host

There are several methods by which you migrate a WordPress site to another host, some approaches are manual such as the use of compressed downloads and database exporting, while others are automated such as the use of migration plugins and tools.

In this guide, we will cover 3 methods for migrating WordPress sites to a new hosting.

How to Transfer a WordPress Site to Another Host Manually

You can migrate your WordPress site manually by downloading it to your local computer and then uploading it to the new host.

To get started, go to your hosting and log into your control panel.

Step 1: Identify your WordPress Site Database

If you have more than one WordPress database in your hosting account, you need to identify the right one for your site. To do this, scroll down to the Files section and click on File Manager.

file manager cPanel

Select your site’s root or public_html or www folder, scroll down to locate the wp-config.php file and open it.

wp config.php root folder

Find the following piece of code:

define( 'DB_NAME',

database name config php

The name between the braces is your database name.

Step 2: Download your WordPress Database

Now that you have identified your WordPress database, let's download it. To download your WordPress database, return to the cPanel home and go to Database > phphmyAdmin.

phpmyadmin cpanel

Click on the database and select the Export tab. Leave the default option (Quick and SQL format) and click the Export button. The database will be downloaded to your computer.

Export WP database phymyadmin

Step 3: Download the WordPress Site Root Folder

Return to File Manager and select all the files and folders in the site’s root folder. Right-click and select the option to compress them to .zip or .tar.gz format. Then, download the compressed file by double-clicking or right-clicking and selecting the download option.

compress migrate site files

Wait for the download to be completed. This may take some time depending on the size of your plugins, themes, and media files. The size will be smaller if you did not skip the cleanup step.

Step 4: Create a New Database and Database User in the New Hosting

Log into the cPanel of the new hosting and  go to Database > Manage My Databases.

manage databases cpanel

Enter a database name and click on the Create Database.

create new database.

Return to the Manage My Databases page and scroll down to Add User. Add a user name (preferably the same as the newly created database name), enter a strong password (or use the password generator) and click Create User.

create new database

Take note of the Database name, User name, and password.

Then return and scroll down to Add User to Database, select the new user and new database and click Add.

add user to database

Lastly, select the new user, enable ALL Privileges and click Make Changes.

user database privileges

Step 5: Upload your Site Database to the New Hosting

Return to your new hosting cPanel home and select phphmyAdmin. Select the newly created database and click on the Import tab. Select the downloaded .sql file on your computer and click Import.

Import wordpress databse phpmyadmin

Note: You can compress the .sql file on your computer before importing it. This will reduce the database size and upload time.

Step 6: Upload your Site Compressed Files to the New Hosting

Return to the cPanel home and select File Manager. Go to the root or public_html folder and upload the compressed size files. Once uploaded, right-click on the uploaded compressed file and unzip it. It should populate the new root folder with all your site’s files and folders.

Would you like a way to skip the process of downloading and uploading your site’s compressed files?

There's a PHP script that you can deploy to upload files from a URL. This script can allow you to move a compressed WordPress site file to another host without downloading it. However for this to work, your new hosting needs to support hosting subdomain or temporary URL.

A temporary URL is a means to access and test a website on a server when the primary domain name hasn't been pointed to the hosting.

cPanel-powered hosting servers make use of the baked-in temporary URL that cPanel natively possesses. To make use of the temporary URL, just use the format below in your browser:

server.fastcow.com/~cpanelusername

serveripaddress/~cpanelusername

Here is an example:

server.fastcow.com/~martjqy

123.123.123.123/~martjqy

However, this option might not work with cPanel-powered hosting providers that have this option disabled due to security hardening.

If you can access your hosting root folder with a temporary URL or subdomain, then copy the following code and save it as a PHP file, e.g. installer.php in the root folder of your new hosting.

Note: Change the URL in the code to your domain name and the path of the compressed zip or tar.gz file.

<?php
define('BUFSIZ', 4095);
$url = 'https://yourdomain.com/public_html.zip'; 
$rfile = fopen($url, 'r');
$lfile = fopen(basename($url), 'w');
while(!feof($rfile))
fwrite($lfile, fread($rfile, BUFSIZ), BUFSIZ);
fclose($rfile);
fclose($lfile);
?>
file uploader script

Open a new tab or window, and enter the temporary URL with the PHP file name attached to it.

For example:

server.fastcow.com/~martjqy/installer.php

A blank loading page will appear. Wait till it stops loading. Then return to your new hosting and see if the compressed site was uploaded. Also, confirm it's size. Then you can delete the PHP file and unzip the site files.

Step 7: Update Database Settings in wp-config.php

Right-click on the wp-config.php file and click Edit. On the Editor, update the database name, database username, and database password to that of the ones you created. Save and exit the file.

update migrated site database settings

Step 8: Update Your Domain Nameservers (DNS)

Go to your domain registrar, update your domain from the old hosting nameservers to that of the new hosting provider, and wait 24-48 hours for it to propagate.

Migrate WordPress to a New Host with a WordPress Plugin

Another way you can transfer a WordPress site to another host is with the use of migration and backup plugins such as Duplicator Pro, All-in-One WP Migration, and UpdraftPlus. 

This tutorial will favour the use of UpdraftPlus and Google Drive to migrate your WordPress website to the new host because it's simple, reliable and free.

Step 1: Install and Connect UpdraftPlus Backup to Google Drive

Install and activate the UpdraftPlus Backup plugin and the Exclude Image Thumbnails from UpdraftPlus Backups plugin.

Then go to Settings > UpdraftPlus Backup.

Click on the Settings tab, select Google Drive as your remote storage, and click Save Changes.

Then, click on Sign in with Google. From the new tab, sign into your Google account and permit UpdraftPlus to access your Google account. 

Click the Complete setup button and you will be redirected back to your WordPress site. Confirm that your site has been authenticated with Google.

Step 2: Backup your WordPress Site to Google Drive

Next, select the Backup / Restore tab and click on Backup Now.

begin site backup updraftplus

Select to backup your database, plugins, theme, and others to remote storage. When the tool is done running, double-check that the backup files are in your Google Drive.

recent backup to google drive

Step 3: Install a fresh WordPress Site on New Hosting

Go to your new hosting and install a fresh WordPress site on it.

Step 4: Point your Nameservers to the New Hosting

Go to your domain registrar and update your domain nameservers to point to the new hosting provider.

Step 5: Restore the Backup to Your New WordPress Site

Once the domain is propagated to the new WordPress site, log into it the WordPress dashboard and install the UpdraftPlus Backup plugin. Activate it and connect it to Google Drive as in step 1. 
After connecting to Google Drive, go to the Backup / Restore tab and click on Rescan remote storage. You will see your site backup date and backup data on the list. Click on Restore and select to restore all components.

updraftplus site restoration components

The backup will download your WordPress site data from Google Drive and use them to overwrite the data of the fresh WordPress site on the new host.

updraftplus site migration success

Step 6: Regenerate Thumbnails

Search the WordPress plugin directory for the reGenerate Thumbnails plugin and activate it on your site. Go to Tools > Regenerate Thumbnails, configure the image settings and click the Regenerate button. The tool will run and all your image thumbnails will be restored. And that’s all.

Migrate WordPress Site with a Web Hosting Migration Tool or Service

Most hosting providers offer a free site migration service. What this means is that when you reach out to their customer service, they will help you take care of the migration for free.

They may ask you for your hosting account details so they can access your hosting and make the transfer.

Please note that others may charge you for this service, so you have to check with them first.

Some also have migration tools or plugins that you can deploy to transfer your WordPress website to the new host.

Things to Do After You Transfer a WordPress Site to Another Host

Check your WordPress Site

After you have transferred your website successfully to the new host, check and ensure that everything is up to par and the website is working smoothly.

Reactivate your Security and Cache Plugins

If you've deactivated your security and cache plugins, it's time to have them reactivated on your site. Also make final checks after doing this.

Backup your WordPress Site

Finally, to avoid compatibility issues, create a new backup of your WordPress site and get rid of old backups from the old hosting account. This new backup will serve as your most recent site backup.

How to Transfer Your Email Accounts to The New Hosting Server

If you used the cPanel Email Hosting to create custom email addresses for your website and have important mail there that you do not want to lose, you can attempt to move your email with your WordPress website to the new host. 

I have to warn you that this option might not work for all hosting providers. It has a better likelihood of working on hosting providers with cPanel interface.

After you have completed moving your site to the new host, return to your old hosting cPanel. Go to File Manager on and select the Mail folder. 

Select all items and compress them. Then download the compressed file.

transfer your email accounts

Head over to your new hosting cPanel. Go to Email > Email Accounts and create new email addresses with the same username as the email accounts in the previous hosting. You can use the same password or a different one.

cpanel custom email accounts

Then go to File Manager > Mail, upload the compressed mail files and extract them. That's it. Your emails have been transferred to your new hosting.

Migrate your WordPress Site to FastCow

FastCow is a managed WordPress hosting provider with our own cloud infrastructure founded by hosting entrepreneurs with the resolution to create a better managed WordPress hosting for everyone. 

Migration to FastCow is seamless and hassle-free. It is free even for unlimited WordPress migration. You are guaranteed zero downtime, zero data loss, zero issues, and the migration of all your emails too.

To transfer your WordPress site to FastCow, simply open a ticket and our team will do all the heavy lifting. All we need is your previous hosting control panel logins, and we will inform you in a few hours when we're done.

We will even provide you with a temporary URL to review the transferred site before you update your nameservers to ours.  

Alternatively, you can migrate your WordPress site to FastCow by yourself. After you create an account, go to your control panel and select Website > Website importer > New Import

FastCow Website Importer

Follow the instructions in the guide and you will have your WordPress website moved to our servers in no time. Then, update your domain nameservers to ours and wait for 24-48 hours for its DNA propagation. 

Migrate to FastCow now!

FAQs

How do I transfer my WordPress site to another owner?

First, ensure to have login details or access to the new owner hosting account. Then, move your site there manually or with a WordPress plugin.

How do I copy a WordPress site from one server to another?

Download or backup the site database and files from the first server. Upload them to the second server. Then update the database settings in wp-config.php.

What is the easiest way to migrate a WordPress site?

This will involve contacting your hosting provider and asking them to do the migration for you. They usually do it for free. You just give them your old hosting details, relax, and wait.

Should I delete my site database and files on the old hosting server after migration?

Although this is optional, it is advisable to delete your WordPress site files on the old hosting server. However, you are welcome to leave the deletion to the hosting provider after your plan expires.

best managed hosting
Shameen S
Stay Updated

Subscribe to our daily newsletter for the lastest updates delivered straight to your inbox

All rights reserved © 2024 FastCow

cross