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) or set it to redirect to the root.
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.
Special Note for WP 2.5+ Users: Some of the nomenclature for the WordPress admin panel has changed. Options has now become Settings.




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
Good article on this! I’ve already set this up before, but wanted to double-check before doing another install. Very concise, clear…
This method is great for having static pages in the root of your site, and your blog posts in a different directory.
# September 26th, 2008
Hii.. I have checked the tip published by you.. but I have a small or may be a big question regarding this. Suppose I have a blog site which is established by me a long time back and some or more SEO has already been done on that website and then after that I implement the things which you described above, then what about those old SEO Links placed with verious websites and search engines..??? will those links work in the same way or will be broken up..?? This question striking in my mind again n again just because you havn’t mentioned the back end process i.e. How wordpress redirecting the links in this process..?? We simply call it a redirection because our installation directory is different than root. Please let me know the answer to my query.
Thanks in advance.
Sham
# April 20th, 2009