If you’re like me, your dislike of clutter goes as far as your Web hosting environment. In other words, the mere thought of all those WordPress files and folders in the root of your domain makes you nauseous. This may not be such an issue for others, although it will be easier to manage your various Web endeavors if you put the WordPress install in its own folder. Say you want to add other Web software installs; you may have a hard time finding the files you need if they’re all mixed in together (although it helps that everything WordPress at this level is named wp-something). It just gets messy if you want to do anything other than just use WordPress.
Installing to a subfolder is the same as installing to the root of a domain, so I won’t go into that. The purpose of this is to have the WordPress install in a subfolder, but have the weblog displaying as if it were in the root folder, and keep the root folder on the server clean. You can either install Word- Press to the subfolder directly, or to the root and then move the files to a subfolder. How you decide to tackle it is up to you; they are both easy to do.
You should really set up permalinks before doing this, since you’ll want them to work regardless. The permalink options are found under Settings → Permalinks. The first thing you should do is create the folder in which you want to put the WordPress install. Then, go to the General Settings page and change the WordPress address URL field to where you want to move your install to, and the Blog address URL field to where you want your site to be. Then click the update button and move all the WordPress files to their new directory except for the index.php and .htaccess files, which should be where you want your site to be. When they are there, open index.php and change this to match where you moved your WordPress install to:
require(''./wp-weblog-header.php'');
That’s a relative link with PHP trying to include wp-weblog-header.php, which is where the WordPress magic starts. Just change the link to point to the file, which should be in your WordPress directory (whatever you’ve chosen to call it), and you’ll be fine. After this, login and update your permalinks structure again to get everything to point to their new destinations.
I think a quick example is in order. Say you have WordPress installed in the root folder (domain. com), and want it to be in a subfolder called wpsystem instead while keeping the actual site in root. That means that when people visit domain.com they’ll see your WordPress site, but when you log in and manage it you’ll do that within the wpsystem folder (or domain.com/wpsystem/ wp-admin/, to be precise).
Now, this means that you’ll need to change the WordPress address URL to domain.com/ wpsystem, because that’s where you want the WordPress install to be, and the weblog address URL to domain.com, because that’s where you want the site to be. Save these settings (don’t worry if anything is acting funky just now), and move all the WordPress files to the domain.com/ wpsystem folder except index.php and .htaccess, which you put in the root of domain.com since that’s where the site is supposed to be. Then, open index.php and locate this code snippet:
require(''./wp-weblog-header.php'');
And replace it with this code snippet:
require(''./wpsystem/wp-weblog-header.php'');
As you can see, the code now points to the wpsystem folder instead, and to the wp-weblog-header.php file. Log in to the WordPress admin interface (which is now on domain.com/wpsystem/ wp-admin/) and update the permalinks, and there you have it.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
Dora Anderson at
09062010
1. The good and the bad of Blogging
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved. Partners: Gunblade Saga