HostPapa CyberMonday hosting offers: shared hosting $2/month!
HostPapa CyberMonday hosting offers: shared hosting $2/month!

How to export WordPress site to new domain in 4 steps?

How to transfer WordPress site to new host

When changing host, or wanting to switch to a new domain, there are a few actions to do on a WordPress installation in order to have it functioning again with the new configuration. Create a free website or blog

However, following this guide, it should be pretty easy to migrate WordPress site to new domain !

It is also how to copy a WordPress site from one domain to another, as the original site does not necessarily have to be deactivated.

The process can be summed up to these actions :

1 - How to export WordPress site

First of all, using a FTP client, connect to the server, and download the whole folder containing the WordPress‌ files. This action will take some time, depending on the local and the server connection speed, it might take up to a few hours.

FileZilla the free FTP solution

While this action is ongoing, do not hesitate to perform the next step, the WordPress‌ database migration.

The local folder should then contain all files, including hidden files like .htaccess (files with name starting with a dot are hidden files on Linux systems).

2 - Migrate database from one server to another

Go on the old server, open the WordPress‌ database, and select the export action.

MySQL, open source relational database management system

There, just make sure that the chosen format is SQL, and click export.

Depending on database size and server speed, a file should be available for download after a few minutes. It contains the WordPress‌ export database, and should be saved on the computer.

3 - Wordpress import MySQL database

Now, on the new server, open the cPanel web hosting administration or other website administration tool, and find the MySQL Databases. Prior to importing the data, a new database, user, and user access to the database has to be setup.

cPanel, the hosting platform of choice

Here, start by creating a new database, giving it any name.

Then, add a new user, with a good password - mix of letters, numbers, special characters. The password won't ever need to be remembered, only copy and pasted once, so save it somewhere handy until like an open Notepad++ tab the next step.

Notepad++ free source code editor

And finally, add the user created to the database, with all access, as this user will be the administrator of the database for Wordpress.

Now, open the MySQL database‌ in Phpmyadmin, and go to the import option. This is how WordPress import database will happen.

Here, select the file that has been created before, make sure the format selected is SQL, and also uncheck the partial import box. This is especially important for big sites, as the script might sometimes take longer to import the database than it is allowed to run.

By unchecking this box, the script will not stop from importing data in case it reaches the timeout execution, which is what we want to do here.

And of course, start the database import operation by clicking OK.

After the SQL import has been completed, a success message should be displayed in phpMyAdmin.

4 - Wordpress database website

Now that the database is setup, it is time to tell WordPress about this new database, by opening the file wp-config.ini on the local backup. As this file is located in the root folder, it was most likely one of the first files to be downloaded, and should be available even if the transfer is not over yet.

However, if this file is not yet available, simply wait for the transfer to be completed.

There, locate the following lines, and update the database name, database user, and database password with the values from the previous step in CPanel :

5 - Upload WordPress site

If the WordPress‌ data has been downloaded from the old server, it is now time to start to upload local WordPress site to server, still using an FTP client.

This operation will most likely take as long as it took to download the data, so take your time and have a coffee =)

6 - Link WordPress to domain

If you are not changing the domain name, this step is not necessary.

However, if you are moving WordPress site to new domain, from one domain name‌ to another, then all the links have to be updated, to show the new URL instead of the old one.

To do this easily, start with Search Replace DB.

PHP search replace tool to update strings in database

Changing the website URL might be a difficult operation. In case of trouble, refer to the official documentation.

Changing the site URL - WordPress codex

7 - How to transfer a WordPress site to another domain

It should now be done ! However, one step might be missing, which is to configure the new server to be accessible by the URL, which is made through DNS change.

This operation can take up to 24h to be visible, therefore be patient if the URL is not working yet, it might be because the whole internet doesn't know yet about your new website.

This process, called DNS replication, might take time, until whole internet associates the address of the new website to its domain name.

How to transfer WordPress site to new domain

Moving WordPress site to new domain is actually pretty easy. To transfer WordPress site to new domain, simply follow these basic steps:

If you only do an export WordPress site to new host, then the last step is not necessary, as the access URL will remain the same.

If you move WordPress to new domain, and the URL is different, then the last step is mandatory, as some URL have the old domain name, and the transfer of the WordPress‌ site to a new domain will necessitate this operation to have correct URLs in the WordPress‌ database.

A Step By Step Guide to Migrating Your WordPress Website to a New Web Host

In conclusion, how to transfer WordPress site to new domain

Transfer WordPress site to new domain isn’t so complicated, as it is only a matter of copy paste of both the files and the database for a transfer WordPress to new host, the database doesn’t have to be moved for a transfer to another directory.

However, when performing a WordPress site transfer to new domain, do not forget to update the database access codes in the configuration files, and to change the new URL in the database, and you should be covered!

Have you managed to export WordPress site to new domain? Let us know in comment how it went!

The 5 steps to export WordPress site to new domain:

  • 1. Export database from old server
  • 2. Import database to new server
  • 3. Wait for import to be completed
  • 4. Import has been completed, check the database
  • 5. Change site URL in options table for domain switch

Example shows the switch from Bluehost,‌ to Interserver hosting‌ solution of a WordPress website database.

Export WordPress site to new domain in video

HostPapa CyberMonday hosting offers: shared hosting $2/month!
HostPapa CyberMonday hosting offers: shared hosting $2/month!

International Business Consulting
About the author - International Business Consulting
Yoann is an International Business Consultant, facilitator and coordinator. He worked more than 10 years in global business, supply chain, financial, SAP ERP projects, Web and SEO optimization for various industries, such as logistics, cosmetics, consumer goods, beauty care, or fashion, in more than 30 countries around the globe.

HostPapa CyberMonday hosting offers: shared hosting $2/month!
HostPapa CyberMonday hosting offers: shared hosting $2/month!

Comments (0)

Leave a comment