Many people want to have a duplicate Wordpress site for testing purposes. In order to do this, there are several steps to take to achieve this outcome. This tutorial will outline the steps for making a copy of a Wordpress site for testing.

Copying a Wordpress site from one location to another

  1. Log into your cpanel
  2. Create a subdomain. that is used for accessing the testing site. For example testsite.yourdomain.com.
  3. Go to your File Manager. Make sure that you select Show Hidden Files when you select the directory to be opened.
  4. Copy your Wordpress Files from your current directory to the document root directory created for your subdomain. The root directory usually is the same name as the subdomain that was created. Also, click in the folder that contains your WordPress installation and copy the .htaccess file. This file needs to reside in the same location where you have copied your WordPress files or at the root of the new location. The .htaccess file may contain important references to your current Wordpress installation. Depending on your installation setup, you may need to look for this file in the root of the account. For example, InMotion Hosting normally uses a document root of "public_html." Check this location for the .htaccess file if you did not find one in the original installation location for your WordPress site.

    duplicate-wordpress-site-for-testing-select-all 4.1 Select all the Wordpress files.


    Important! When selecting all your Wordpress Files, make sure the folders for the subdomains/addon domains, or any other non Wordpress folders, are not selected. After selecting all, hold the Ctrl key on the keyboard and click the folders that are not being moved so the are not highlighted blue before copying the files. Otherwise, there will be duplicates of those folders in the testing site.

    duplicate-wordpress-site-for-testing-copy-files 4.2 Click Copy at the top right side of the File Manager


    duplicate-wordpress-site-for-testing-click-copy 4.3 Type the path to the Document Root folder for the Sub Domain.


  5. Create a database This will be used to separate the test site from your main site. If you use the same database for the test site, the live site will reflect the changes that are made on the test site. Importing the existing database to the test site database will prevent this.
  6. Export your current database
  7. Import your Database to the new database you created.
  8. Configure the Test Wordpress wp-config.php file for the test site. This needs to be done or the test site will use the main Wordpress site database.
  9. Change the site URL for the test site - The site URL is stored in the Wordpress database. in order for the site to load as a test site, the site url will need to be changed to the subdomain url. For example http:// testsite.yourdomain.com.
  10. Correct image links - Lastly, ensure that image links in your pages and posts are also changed. These are in the database and not connected to the site URL so they will need to be changed separately.

This concludes the tutorial for duplicating your Wordpress  for testing.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2164
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5551

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!