Okay I’ve googled this for hours…I installed wordpress to a subdirectory as a content management system, but I want my main index.php along with other files to remain in the root.
What .htaccess code do I need to so that the main url http://foo.com/index.php doesn’t look for the wordpress/index.php (which of course causes the error “Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/…”
WordPress core in a subdirectory, but accessed via the root folder
If you’re trying to move WP to a subdirectory, but access it from the root, use the following approach.
Keep your index file in the root, but point it to the proper path:
./SUBDIRECTORY/wp-blog-header.php
instead of./wp-blog-header.php
Make sure you change you change the
home
andsiteurl
settings to match your directory structure either in Settings->General or by adding the following to your wp-config.php file:WordPress completely isolated to a subdirectory
If you would like to keep WP completely in the subdirectory, just move your .htaccess index.php files to the sub instead of the root. As long as it doesn’t conflict with the root .htaccess, it should work just fine. You can have nested .htaccess files within subdirectories and permalinks should work just fine.