Duplicate Your WordPress Site To Create A Test Site?

For bloggers, there should be a website with which they can test their plugins and themes. Most of the people prefer to have an extra site which can help them to know the results of any new plugin or the latest version of the WordPress. From the security point of view, it’s good to have a test site.

Do you know how to create a test site? In this tutorial, I am going to let you know about creating a test website. The website would be the same just like your main website.

How To Create A Test Website?

Before starting, you should have an idea about this process. In the creating of a new test website, we are going to duplicate the whole content of your main website so that you can use it efficiently. It’s like a new website.

Let me guide you to the required steps:-

Step 1:- Login to your web hosting cPanel and create a sub-domain from the “domains” section. It is because we are going to add the test website into a sub-domain.

Step 2:- After creating the sub-domain, go to the “files” section and open the file manager from your cPanel. Don’t forget to click on the checkbox to show the hidden files.

Step 3:- Copy all the files and folders present in the root directory. If you’re are running multiple websites then you have to uncheck the addon domain folders because the data of other websites is not needed.

And if you have moved your website from the root directory to any folder then open that folder and then copy all the files and folders.

Step 4:- When you copy the data then you will be asked to set the location for the copied data. You have to fill the name of the folder created for your sub-domain and send the whole data in that folder.

Step 5:- Now, you have to create a database to import the database of your current website.

Step 6:- Export or backup the database of your main website and import it in the new database you have just created.

Step 7:- Make sure that you don’t create the database with the same name as the main database. Now, you have to add the database credentials in your “wp-config.php” file for which you should know how to edit the wp-config.php file.

Step 8:- To load your test website, you have to change the URL from the phpMyAdmin. Make sure you fill the sub-domain name. Just like:- http://test.domain.com

Step 9:- You are going to use the database of your main website with the different name so it’s important to set the image links. If you don’t do that then you will see the broken image links.

You have successfully added a new test website on your web hosting server. You can add many test website using this method.

NOTE:- You don’t need to index your test website in the search engine. So make sure that you click on the checkbox to let search know that the website doesn’t need to be indexed. Just go to setting>>reading and click on the search engine visibility checkbox.

Can You Duplicate Your WordPress Site Now?

The above-mentioned steps would let you create a test site to experiment. This is not the only way for adding a test website. You can use other methods too. People like to keep the whole website separate so it’s good to create a sub-domain.

If you want to add any other test website then follow the same procedure. It would be great to have a website to test the new plugins so that you can secure your main website. If you want to change the design of your website then you can first check on your test site and then apply on the main site.

There are many other things which can be done with the test website. If you face any difficulty when you create a test site then feel free to ask.

You can also connect with us on Twitter, LinkedIn, and Facebook.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.

Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE

6 comments

  1. Thank you Ravi for this article. I am in need of this. Until today I have been testing new things in my another blog – which I have opened it for this purpose only. With your idea, I think I don’t have to use that blog for only testing. I can use that for another niche, which is great.

    1. Hey Sherab,

      Keeping a blog just for the testing purpose is the waste of that domain. You can just duplicate the content of your main site and create a test website. But make sure that you don’t index this test website.
      Google would consider it is the copy and it may hard your main website. So just one safety step and you’re good to go.
      Thanks for being here.
      Enjoy the day.
      ~Ravi

  2. Ravi, how are you doing today?

    It’s an awesome article. Actually, I didn’t do this when create testing website. I always do it offline with local host or test it on DigitalOcean as I just spend $5 for testing on top level domain. LOL.

    However, I love your idea as it save some money. Well. noted the most important point at the last of the article. Make sure every checked that box, otherwise they will get penalise.

    1. Hey Kimsea,

      It’s the matter of the choice. There are many people who prefer this method. The usage of the local host is the best one. It would provide the best and separate platform to test your website.

      Though there is no need to spend the money but still, security should be considered.
      Thanks for taking time to share your thoughts.
      Have a great weekend.
      ~Ravi

  3. Hello Ravi,

    What a nice and lovely tutorial on how to create a test site using a subdomain. though i am using an external machine to test my plugins and other renovations i might be doing at my blog.

    Your tips for creating a test site using ones domain is valid and can be understood by all.

    Thanks for the tips and do have a lovely week ahead…

    1. Hey Babanature,

      There are many ways to create a test website. It just the sub-domain method will let people have the separate portion for their test website.
      The idea of using any external platform is the best in the count of the security.

      Thanks for sharing your thoughts.
      Enjoy the weekend.
      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *