On some of my WordPress installations, usually for larger sites or sites that already have a lot of folders and files, I choose to install WordPress in another directory.
This may be something you may want to consider if you just want to keep things neat and organized on your server.
First things first, back up all of your files before you do anything else.
1. Install WordPress as you normally would, but instead of installing it in the blog’s root directory, install it in the folder you want to use as your back end - like “admin” or “wp”, etc.
2. Once you’ve completed your installation of WordPress, login to the admin panel and from the Options -> General tab, you’ll need to set your WordPress address to the folder you installed WordPress (without the trailing slash) and set the Blog address to your blog’s root address (without the trailing slash).

3. In a text or HTML editor, open the index.php file and change the location of your wp-blog-header.php to the new location.
Example: if your WordPress installation folder is ‘admin’, <?php require('./wp-blog-header.php'); ?> becomes <?php require('./admin/wp-blog-header.php'); ?>
4. Upload the edited index.php to your blog’s root directory (i.e. not the ‘admin’ folder) and delete the index.php file from your WordPress directory (i.e. the ‘admin’ folder).
5. If you’re using permalinks or other rewrite rules, the .htaccess file needs to be in the same location as the index.php file (i.e. not the ‘admin’ folder)
Remember that your login and registration links will change. Where you used to visit http://www.yoursite.com/wp-login.php, the location will now be http://www.yoursite.com/admin/wp-login.php.
People should still be able to visit your blog’s homepage and see everything as they normally would, and you have a neat WordPress folder behind the scenes.



Thank you for the information! I was clicking on the wordpress directory everytime I went to my site before boringest directed me to your blog!
Thank you thank you thank you….
# May 11th, 2006
What is the advantage of installing WP in a different directory? wouldn’t it be troublesome when come to access?
I just want to know what is the advantage? safe fr hacker attack?
# August 4th, 2006
A little old I know - but I recently forgot how a problem with my way of doing this and found my way here so I’ll answer Steven’s question, although he’s probably had an answer by now:
If you’re like me and installed wordpress in a different directory from the root folder but want the blog showing up when people go to your domain (instead of yourdomain.com/wordpress) then that is the advantage of being able to do this ^^
# January 29th, 2007
Thanks a lot for sharing this tips to us. I tried it and it worked in right away.
Wonderful.
Thank you!
# April 9th, 2008