[email protected] +91-120-6025102
Submit

Avail Best discounts

Please fill in the form below and we will contact you within 24 hours.

How to copy my WordPress site into a sub-domain?

Copying WordPress site into a sub-domain requires few steps to accomplish, all of them through cPanel.

Step 1: Login to your cPanel

Step 2: Create the desired sub-domain which will be used for accessing the testing site.

Step 3: Go to File Manager. Check Show Hidden Files

Step 4: Copy WordPress Files from your current directory to the document root directory created for your sub-domain. The root directory of the sub-domain can be put in the pop-up window. Copy the.htaccess file. This file should be kept in the same location where your WordPress files are copied or at the root of the new location. The .htaccess file may contain the substantial reference to the current WordPress installation.

Step 5: Create a database which can be utilized to segregate the new sites from your main site. Determine that you've saved the database name, usernam, and password because you'll be required further.

Step 6: Export your current database using cPanel>phpMyAdmin. If not aware of which database to export, locate the wp-confic.php file in your File Manager and use "View" option.

Step 7: Import your database to the new database you created recently.

Step 8: Configure the new WordPress wp-confg,php for the test site. This configuration requires to be accomplished or the sub-domain site will use the database of main WordPress site. Use "Edit" option in the "File Manager". Determine the changed file is the one which resides in the folder of the subdomain, not the main domain.

Step 9: Change the site URL for the test site in phpMyAdmin. The site URL will be stored in the database WordPress, in order for the site to load as a test site, the URL of the site will require to be changed to the sub-domain URL.

Step 10: Make sure that links for images in your pages and posts are also changed. They are in the database, and not connected to the URL of the site. Therefore, they will need to be changed independently. Finally, search the database for the original URL and then it in the result.

That's it. You successfully created a new working copy of the site in a subdomain.

Was this answer helpful? #0 #0
 

Submit Query

Please fill in the form below and we will contact you within 24 hours.