Steps to migrate a site

I have a website for which the domain is registered under Cloudflare.
I am switching the host and adding a CDN along with the host as well. But I cannot find a way to change name servers on my Cloudflare dashboard. The only option it serves is updation of Ip and A records.
Any guidance on the same.
I just want to use Cloudflare as a domain registrar and the host+cdn shall look after firewall and CDN.

Looks like it’s not possible yet on CF.

1 Like

Firstly if youre using cloudflare then you don’t need ever to change the nameservers of your domain again.

As you want to to migrate to a new host so first create a backup of your existing site by this following method.

  1. Open your WordPress installation forlder, select all and make a archive of all files and folders.

    Tip- if you haven’t cpanel then open filezilla a free ftp software and connect your server by using your host name, password and port. Open WordPress installation path, and create a archive and download it to local storage.
  2. Take a backup of your database. Open Phpmyadmin> Export>Quick Export>Choose format SQL and Go.
    Then your SQL database will be downloaded to local machine.

1.First ask host for ip of server instead of Nameservers. Put then in cloudflare>DNS> A records (important- either update existing a records or create new a records after deleting the existing a records)
2. Upload the WordPress archive to public_html folder(cpanel)/HTML(for vps)
3. Unzip it to there.
4. Go to database manager, create new database+user. And assign the user to database and give the user all permission.
5. Come back to WordPress files section. Open wp-config.php
And edit this part

/** The name of the database for WordPress /
define( ‘DB_NAME’, ‘database_name_here’ );
* MySQL database username /
define( ‘DB_USER’, ‘username_here’ );
* MySQL database password */
define( ‘DB_PASSWORD’, ‘password_here’ );

Replace the database name at here


Enter new database username here


and user password with new database name and database user password put here


If you will do anything mistake here you will see a message database connection error while accessing your site.
Check all things are working properly or not.
Then you can have a cup of tea.

And setting up a CDN @GulshanKumar will guide you.

1 Like

Step 1. Go to cPanel > Advanced DNS

You will see records like this

A -- @ - IP
CNAME - www -
CNAME - subdomain -
A - mail -  IP
MX - @ - - 10
TXT - @ - xyz

Explanation line by line

  • A record can accept only IP address so top level domain can be used for this
  • CNAME can have hostname only, it can be used for www
  • MX is for receiving e-mail
  • TXT is generally used for verification purpose

Step 2. Cloudflare supports all these kind of “DNS Entries” you need to manually set and make site live.

At least you need just server IP that you can find easily inside Control Panel.

1 Like