Displaying on root a WordPress website installed in a subdirectory

Moving process

Here are the steps to display a WordPress site installed in its own sub directory

 

  1. Go to the General Screen.
  2. In WordPress address (URL): set the address of your main WordPress core files. Example: http://example.com/wordpress
  3. In Site address (URL): set root directory’s URL. Example: http://example.com
  4. Click Save Changes. (Do not worry about the errors that happen now! Continue reading)
  5. Now move your WordPress core files (from root directory) to the subdirectory.
  6. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you click on settings and check ‘show hidden files’.
  7. Open your root directory’s index.php file in a text editor
  8. Change the following and save the file. Change the line that says:require( dirname( __FILE__ ) . '/wp-blog-header.php' );to the following, using your directory name for the WordPress core files:require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
  9. Login to the new location. It might now be http://example.com/wordpress/wp-admin/
  10. If you have set up Permalinks, go to the Permalinks Screen and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions.

Discover more from Makao Bora

Subscribe to get the latest posts sent to your email.

Join The Discussion

Leave a Reply