How to change the domain of a WordPress website?

 

Copying Files to the New Domain

 

To add a new domain read following article. 

 

How to Create Addon Domain in cPanel?

 

To copy files to your neü domain folloü the next steps:

 

Go to cPanel and open File Manager:

 

 

Open the public_html folder:

 

 

On the top of the screen, click Select all:

 

 

 

Press and hold the Ctrl key while clicking the following folders (to unselect them) in your public_html folder:

  • cgi-bin
  • addon domain folder

 

 

With the files still highlighted, click Copy in the top menu of the File Manager:

 

 

 A pop-up will open showing the following path:

 

/public_html

 

Type the name of the addon domain folder to which you are copying the files. This box will now look similar to:

 

 

Replace addondomainname.com with the actual domain name.

 

Click Copy File(s).

 

Once the files have been copied over to your addon domain folder, you will need to create a new MySQL database.

 

How to Create a MySQL Database?

 

Editing the WordPress .config File for Your New Site

 

To edit the wp-config.php file for WordPress:

 

Go to cPanel and choose File Manager.

Open the public_html folder and locate your addon domain folder.

Right-click on the wp-config.php file and click Edit:

 

 

Edit the following information to reflect the values that were assigned to the newly created database:

 

 

DB_NAME

DB_USER

DB_PASSWORD

 

Click Save Changes.

 

Exporting the Database

 

Export the database from the primary domain and import it into the newly created database. For help with this process, please read the following article:

 

How to Import Your MySQL Database?

 

Updating the Database

 

The database settings must be updated to reflect the new domain name information.

 

Go into cPanel and click on the phpMyAdmin icon.

In the left navigation panel, click on the newly created database name.

In the left navigation panel, click >wp_options:

 

 

Edit the siteurl line to change the primary domain name to the addon domain name.

Click >Go.

Edit the blogname line and change the blog name to reflect your new blog.

Click >Go.

Edit the blogdescription line and enter the new blog description.

Click >Go.

 

 

In the left navigation panel, click >wp_users:

 

 

 

Edit the user_login line and change the user name to a new one.

On the user_nicename line, change it there as well. For security purposes, do not use Admin as a username.

On the user_pass line, delete the characters already in that box and create a new password.

In the varchar(60) box click the down arrow and select MD5.

Click >Go:

 

 

Coupon partner DomainhostCoupon.com