Making WordPress store its files in a secret folder

I installed a fresh copy of WordPress but wanted to keep my root directory clean.

The easiest way to do this is just to install it into a directory, change the site address to the root, and then copy the index.php up one level and change the line about requiring the wp-blog/header file to reference the directory you just installed WordPress into.

[code language=”php”]require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );


[code language=”php”]require( dirname( __FILE__ ) . ‘/newblog/wp-blog-header.php’ );

It’s all here:

Leave a Reply

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