Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Here is the scenario -

I want to COPY (not move) the blog from www.domain_name.com/ to www.domain_name.com/folder...

I want to keep the copy in root folder intact but run the same blog on subdomain too (with entirely different database but replicated).. You might find me idiot to do that, but this is the need.. We are moving blog to sub folder but the scenario is such that it wants me to keep the copy intact in a root folder entirely (with it's independent database). We will remove the root blog later anyway.. It is just for time being.

I can move the blog but not getting how can I replicate the blog (with independent database) in a sub directory..

Please share your views..

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Copy all of the files to the new folder.

For the database, you'll need to use something like PHPMyAdmin to export the current database as a .SQL file.

Edit the .SQL file you downloaded to remove the first statements specifying what database to use (it will be "USE database").

You'd then need to create a new database using your website's control panel software (like cPanel of Plesk for instance).

Then go to PHPMyAdmin once more, select your new database, and then do an Import, and select the edited SQL file as the file to import.

Then edit wp-config.php in your subdirectory, to use the new database name.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.