These days I have to develop a lot of websites where each is based on a certain CMS, ie. Wordpress, Drupal or Joomla. Instead of always copying the files of each CMS to my project folder, is it possible to have a kind of lib for each CMS and only link to one of them from within my project folder?
So the following setup:
~/lib/
|---wordpress
|---drupal
+---joomla
~/projects/
|---project1
|---project2
.
.
.
+---projectN
What I would like to do is create a structure of symbolic links (or something similar) in each project folder, so that http://localhost/projectN uses all the files of one of the cms located in the ~lib/<nameofcms>/ folder.
I have already created something like this with the following command:
ln -Ab ~/lib/wordpress | xargs -n 1 -I {} ln -s ~/lib/wordpress/{} {}
from within one of the projects folders. That actually worked, but when I tried to »override« the configuration file (in case of wordpress it is the wp-config.php), by replacing the link with a »real« file, it did not work anymore because this very file could not be found any more.
That happened because PHP resolved the symbolic links and so it was looking for:
~/lib/wordpress/wp-config.php
instead of:
~/projects/projectN/wp-config.php
Is it possible to create such a linked project structure that works on my local machine? If so, what do I have to do?
