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..


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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