Many people want WordPress to power their site’s root (e.g. http://yourdomain name.com) but they don’t want all of the WordPress core files cluttering up their root directory. WordPress allows you to install the WordPress files to a subdirectory, but have your blog exist in the site root.
A lot of WordPress users don’t realize they are able to put WordPress in any folder on their site and still have it use the root domain name for its’ location. This is a basic feature of WordPress that you are able to pull of from the start or after you’ve already installed it. There a few reasons why you might want to do this. It can make things more secure and don’t clutter. Moving WordPress to a location other than your domain’s root is useful if you don’t want people to be able to see your admin area easily.
The process to install WordPress into its own directory is as follows:
1. Create a new folder in your root directory (I use folder name “WP”).
2. Upload wordpress to WP folder.
3. Open browser and type your domain name ie. http://your_domain_name.com/wp/
4. Run wordpress installation. After installation complete, login as admin.
5. Go to Setting >General
6. In General>Setting in the box for WordPress address (URL): change the address to the new location of your main WordPress core files.
7. In the box for Blog address (URL): change the address to the root directory’s URL.
8. Click Save Changes.
9. Copy the index.php and .htaccess files from the WP directory into the root directory of your site.
10. Open your root directory’s index.php file in a Notepad.
11. Change the following
to the following,
and save the file.
12. Login to your site again. It might now be http://your_domain_name.com/wp/wp-admin/
13. Go to the Setting>Permalinks panel and update your Permalink structure.
WordPress will automatically update your root .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your root.htaccess file, it will display the new rewrite rules to your WP Folder .htaccess file, which you should manually copy into your root .htaccess file