How to change subdirectory WordPress back to the root directory

To return a subdirectory WordPress to the root directory, perform the following steps.

  1. First, find the following line in index.php and modify it as follows
    require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' ); to require ( dirname( __FILE__ ) . '/wp-blog-header.php' );.
  2. Then, using a search and replace tool (e.g., “Search Replace DB”), change the site URL to
    localhost:8000/wp > localhost:8000

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top