Everyone hates moving. Whether you’re moving across town or across the country, packing your things and making sure everything ends up in your new home is daunting. The same goes for moving your website from one web hosting service to another.
Unlike moving in the real world, you might not know how to move blog posts, images, videos, and other content to the new domain. Do not worry; we’ll walk you through the necessary steps to make the process as easy as possible.
1. Back up your website
We assume that you have already found a new host and a new domain name for your site. Now you have to pack everything for the move. In this case, that means backing up your website. There are three main ways to do this.
The WordPress method
If you’re working with a WordPress-powered website, you’ll need a WordPress plugin to wrap it all up. Duplicator(Opens in a new window)AncestryMore(Opens in a new window)and all-in-one WP migration(Opens in a new window) are just three of many options. These easy-to-use plugins allow you to back up your WordPress site in just a few clicks. Using Duplicator, for example, you must:
Click on “Packages” then on “Create new”. This creates a package containing all of your site and WordPress assets, as well as an installer.
Download the site archive package.
Use the installer to open the archive package in your new hosting environment.
Top Rated, Tested Web Hosting Services
The cPanel method
The top level is to use a website’s control panel. Many popular web hosts use cPanel, for example, to manage files. Here’s how:
In cPanel, navigate to the “Files” section and click on “Backup Wizard”.
Take partial backups of your home directory, MySQL databases, and email forwarders. In a weird wrinkle, you don’t want to create a full backup, because you can’t actually restore from it.
Access the cPanel of the new host. Restore each backup file, one at a time.
The FTP method
If you are used to working in the backend of a site, you can back up your site files via File Transfer Protocol (FTP) and phpMyAdmin. You can perform an FTP backup with any FTP client, we recommend FileZilla. Additionally, you will need to have the login credentials from the old site. Here’s how:
Connect with the FTP client or use the file manager built into many control panels and download the contents of the “Public_HTML” folder.
Next, you’ll want to find phpMyAdmin; it is usually found in the “Databases” section of your control panel. Click on the “Export” tab, “Quick” as the export method and “SQL” as the format.
Click “Go”. This creates a database file that automatically downloads to your PC.
Reverse the two processes on your new domain.
2. Check your DNS settings
Did you acquire a new domain name from an independent domain registrar? Was the new domain part of a web hosting package? Either way, make sure your Domain Name System (DNS) settings are correct.
A DNS record connects your domain name to your website and your server. These DNS records are usually in the form of an IP address, a subset of four digits (22.214.171.124, for example). There are also general nameservers that come in the form of URLs. You will get them from your web hosting provider. If your registrar and host are the same, you can skip this step. If not, you need to add this information to your domain name registrar. Here’s how:
Log in to your new domain server account and verify the server details. This will be in a different place on each hosting provider. This should include your DNS record and your nameservers.
Log in to your domain registrar and modify the DNS record and name servers to match your new domain.
Wait, as it may take 24-48 hours for the process to work.
3. Transfer files to a new domain
This step is essentially the reverse of the first step. You will need an archive of all the files in your home site directory, as well as the database, which tells your web server where all the content is going. It’s important to make sure both are in the right place.
First, you need to make sure that a database has already been created on the new site. (For WordPress sites this will usually be wp-config.php.) Then, using phpMyAdmin, import the contents of the archive file into the existing database. Select the “Import” options in phpMyAdmin, choose the file from your PC, then click “Go”. This should import all the database entries from your old site into the new one. Now you can upload your site files.
How to transfer files with WordPress
You will need to use the installer and archive you downloaded in the first step.
Use an FTP client or the built-in file manager to connect to your new web host
Click on the installer to begin the restore process.
UpdraftPlus and similar plug-ins may have a clone or migrate option that lets you restore everything from a file to your PC.
How to transfer files using cPanel
If you went the cPanel route, just go to the backup wizard on your new domain and restore your site from the previously created files. It’s the “no fuss, no fuss” option.
How to transfer files via FTP
Use an FTP client or the site’s built-in file manager to connect to your new web host.
Upload the archive files from your old site’s home directory to the new host’s home directory.
Download your database file. The database file must be on the server for the next step, so upload it now.
4. Make sure to redirect pages
If you want traffic directed to your old domain to go to your new one, you need to redirect the old site to the new site. Otherwise, users will see a 404 Page Not Found error when they try to access your site on the old domain. Follow these steps to set up your redirects:
Use FTP or File Manager to connect to your old domain’s registrar or hosting account.
Edit the .htaccess file. This will be in your home directory or the same directory as your wp-admin folder for WordPress users.
Open the .htaccess file and add the following code:
#Options +FollowSymLinksRewriteEngine onRewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]
Replace “newsite.com” with your new domain name.
Now your old domain name should redirect to your new one. If not, you should contact the technical support team of your old hosting service for assistance.
5. Fix all broken links
If you did everything correctly, the links from the new site should work. Some links may point to your old website that no longer exists, so use w3C Link Checker(Opens in a new window)dead link checker(Opens in a new window)or Dr. Link Check(Opens in a new window) to uncover those broken links. You have to fix each dead link one by one, by manually changing their location. It’s worth it, though.
6. Notify Google of the site transfer
The final step is to tell Google about your new home! You can do this using some of Google’s own tools.
Recommended by our editors
If you use the Google Search Console(Opens in a new window) with your old domain, click the gear icon, then select “Change address”.
Enter your new domain name here and let Google handle the search traffic redirection.
You will also want to have an XML sitemap for your new domain. If you’re using WordPress, here’s how to do it.
Install the Yoast SEO plugin. The plugin will automatically create an XML sitemap at: http://newsite.com/sitemap_index.xml(Opens in a new window). That’s it!
If you are not using a WordPress powered site, there are other options.
Visit XML-Sitemaps.com to generate one for your new website.
Upload the created file, then use an FTP client or file manager to upload the file to your site’s home directory. The file must be “sitemap.xml”, which means that its URL will be: http://newsite.com/sitemap.xml(Opens in a new window)
Next, under Google Search Consoles, you want to click on “Sitemaps” under the “Index” section. Then you can add the URL above and click “Submit”.
Now Google can easily crawl your website.
7. Check your site
The last step is the easiest: verify your new domain! Take the time to click around your site to make sure all the posts, images, and videos are in the right place. Fix any missing elements on your backend.
If you have a fairly popular site, it may be your responsibility to let your community know about the domain change. You may experience service outages as the migration process progresses, and it’s a good idea to let your visitors know about them. Either way, welcome to your new home on the web.
To learn more about web hosting, check out The Best Courses to Learn How to Build Websites. Once your site is live, use these 10 simple but powerful SEO tips to increase traffic.
Do you like what you read ?
Register for Tips & Tricks newsletter for expert advice on how to get the most out of your technology.