I want to replace my WordPress site with a non-WordPress site but keep the original WordPress site in a sub-directory. I have read through and tried this and various other methods but none seem to work or don't seem to fit my needs.

The current WordPress installation: https://example.com

I want it at: https://example.com/blog

Importantly all the instructions ask me to copy the index.php and .htaccess files to the root at the end. This I don't want. In the root, I will have a different index.php that is unrelated to WordPress.

Any help appreciated. TIA

  • 1
    those are talking about moving the WordPress folder as in the code, but keeping the site at the same URL. What you're talking about however is a site migration. Articles talking about moving from abc.com to xyz.com are what you want to look for
    – Tom J Nowell
    Jul 4, 2022 at 12:07
  • Move the entire WordPress installation (including index.php and .htaccess) to the blog directory. Change the Site URL and WordPress URL manually in the database. (You may also need to change a few other instances of main url to blog url in database)
    – Abhik
    Jul 4, 2022 at 14:13

1 Answer 1


Move all your WP installation to the subdirectory, Then uodate in your DB (wp_options by default) the siteurl and home with the new url. change https://example.com to https://example.com/blog

You need also to replace all ocurrences of example.com to example.com/blog in your DB manually, with SQL or with a plugin such Better Search Replace

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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