Run wordpress in subfolder of domain

To run the website as blog in subfolder of domain i.e www.example.com/blog

you need to change .htaccess .

Normal .htaccess file is as follows

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

you have to change few line here i.e. folder name where the wordpress files lies in eg. blog folder

# BEGIN WordPress

RewriteEngine On
RewriteBase /blog
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

# END WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *