views:

36

answers:

2

Have a client who wants to move their Wordpress.com blog over to their main domain that has a Drupal installation. If I add Wordpress to a "/blog/" directory on the server, will there be any conflicts with the htaccess ie Mod Rewrites etc?

Thanks.

+2  A: 

If you place the WordPress files within the /blog/ directory then no, there certainly shouldn't be any htaccess conflicts.

Update :
What berkes suggests below (ie putting WordPress and Drupal in their own separate folders side by side) would be an ideal solution if you were starting from scratch.

However, it would change the URLs of all existing content, which you probably don't want.

One thing you could do is install them side by side and then use mod-rewrite to make example.com/blog go to the wordpress directory and anything else go to the drupal directory.
This way all existing content would stay at the existing URLs even though the drupal instalation had moved.

Note that even this solution would prevent anything which Drupal tried using the /blog path for from being visible, instead redirecting to WordPress.

caesarsgrunt
To add a bit to this, .htaccess doesn't need to go in the domain root, so if Wordpress is running in /blog/, Wordpress' .htaccess will only be used on requests that start with /blog/, and Drupal .htaccess is only used on requests that don't match existing directories, so it would cover everything not in /blog/.
Scott Reynen
Since Drupal can have any url path (including /blog) this will cause problem at some point, unless you can avoid any module, configuration or path that starts with /blog. But that is a guarantee Drupal cannot provide, nor can you make it give such a guarantee. So at the least, the chance that something will break is rather large.
berkes
@berkes - The question which philmadelpia asked was "will there be any conflicts with the htaccess ie Mod Rewrites etc?" - and there won't be any htaccess problems.However, what you say is true. This will always be an issue when installing one CMS in a subdirectory of another one. The best that can be done here is to avoid creating content in Drupal using the /blog/ path, which should be manageable.
caesarsgrunt
@caesarsgrunt, whether or not avoiding such a path is managable relies entirely on the use case. So, in general, the answer to "will there be any conflicts with the htaccess ie Mod Rewrites __etc__" is, "yes, it will. But you might probably find ways to solve each conflict.".
berkes
@berkes - I don't follow that, sorry! :) I can see that if Drupal were to use a `/blog/` path that would make WordPress invisible. But why would there be any *htaccess* conflicts?
caesarsgrunt
Thanks guys....
philmadelphia
A: 

It will be impossible to install Drupal and Worpress in one directory. Not only because of .htaccess issues, but also because of (potentially) conflicting files and libraries. Moreover: your maintainance and upgrades will be come hell.

  • I would advice to use different virtual hosts. Any more professional webhoster allows you to define virtualhosts. Defining them depends on the server, setup, lfavour of OS and so forth, and is a whole topic on its own.
  • Alternatively, you could create a /path/to/webroot/__cms__/ and /path/to/webroot/__blog__/directory. Advice you to not put Wordpress under drupal (a /blog directory in the Drupal directory) nor to put Drupal under wordpress (a /cms directory inside your WP install. This will lead to conflicts. Drupal may have an url /blog (it does!) that will conflict and wordpress may have a /cms url (it doesn't, but could have) that will conflict. Side by side, not inside one another.
  • Another alternative would be to bridge one CMS with the other. This is tough and complex, but it would be possible to include wordpress in Drupal or vice-versa, given you have enough development and configuration time and -experience.
berkes