Installing WordPress in Drupal’s sub directory

Last week one of my clients asked me to move her blog which is using wordpress to a new server under Drupal sub directory. So for example the main website is and this main site is using Drupal and I have to setup wordpress under blog directory or  As you know that Drupal htaccess file will intercept all requests to the main site and that will cause some problems to the wordpress site. Then what should we do is:

Update Drupal Htaccess

edit Drupal htaccess file so that it will exclude blog directory, we just need to add this line of code RewriteCond %{REQUEST_URI} !^blog before processing index.php, here is the complete code:

Update WordPress Htaccess

edit you WordPress htaccess file. we will add RewriteBase line since the wordpress will run under /blog directory and also we will update the rewrite rule to index.php file. here is the complete code:

That’s it now your wordpress will run under Drupal subdirectory without a problem

Leave a Comment

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