Duplicate Your WordPress Site To Create A Test Site?
August 19th, 2016 | by Ravi Chahar || 6 Comments |
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 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.