Installing WordPress in sub directories

To install WordPress in a sub folder instead of your site root, you’ll need to make a couple changes.

If you are doing a new WordPress install, you will skip this first step. To move an existing site, the site path has to be changed in all instances in your database.  For instance, if WordPress was installed at www.yourdomain.com but you are moving it to www.yourdomain.com/blog, the new url in your database replacement scripts should be www.yourdomain.com/blog.  Please see Switching URLs in WordPress for database replacement scripts.

If you are doing a new instal, or moving an existing site you will need to change your .htaccess file.  Your .htaccess file should look like the following if WordPress is installed in the folder “blog”.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

There are two lines that need to change, RewriteBase and RewriteRule.

Your WordPress files, including the .htaccess file, should be ftp’d to the “blog” folder in the root of your site.  After making these changes, your blog should come up at www.yourdomain.com/blog.