Copy WordPress Website to a new Domain on Different Server using cPanel

In this article I will explain how to copy a WordPress website to a new domain on different server using cPanel.

Copying WordPress website is simple and easy. Please follow the below steps.

Let’s assume we are copying the WordPress site from to

Step 1

Login to cPanel, click on file manager and go to public_html

Select all files and directs except .cgi-bin and log files.

Right click and archive. Note the archived file name for future reference. Let’s assume is the archived file name.

Make sure is downloadable.

Step 2

Go to phpMyAdmin select the database and export.

Step 3

Login to new domain server cPanel and go to public_html

Delete if there are any default files.

Let’s do a simple trick to copy the archived file from to

Create a file get.php and put below code.

file_put_contents(‘’, file_get_contents(‘’));

On a new tab try to access get.php on new domain.

Success if blank page appears. This should copy the file to new server.

Now delete the get.php file.

Extract the file and delete the file from old and new server.

Step 4

Create a database and a user on new domain server.

Note the Database Name, User Name and Password.

Add the user to the database with appropriate permissions given.

Go to phpMyAdmin and select the newly created database.

Click on import tab and import the earlier exported sql file from current server.

Select wp_options table and change siteurl and home option URL to

Step 5

Go to file manager and public_html.

Edit the wp-config.php and replace the Database name, User name and Password.

On a new tab open and login with old user login details.

Navigate to Settings => Permalinks and click on “Save Changes”.

Step 6

Install the plugin Find and Replace All using plugin installer and activate.

Navigate to “Find Replace All” settings page.

Enter Find String “” and enter Replace with String “” and click on “Replace Now” button.

Now all the hard coded hyperlinks and image sources are replaced with the new domain link.

So you have successfully copied WordPress site to new domain. This is the manual method and most reliable.

Hope this helps.

Share this Post