Mobile app version of vmapp.org
Login or Join
Kevin317

: Can a CMS be installed in a central location to be used by multiple sites? These days I have to develop a lot of websites where each is based on a certain CMS, ie. Wordpress, Drupal or

@Kevin317

Posted in: #Cms #Links

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 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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

2 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

I understand that you're looking for a generic solution for a multi-site where you do not have to care about how the multi-site feature is implemented in any given CMS. I.e. you are hoping for an answer describing some fancy "scheme" where you're able to link from a project site to a set of CMS "libraries".

The short answer is: This is not possible.

Every given CMS uses a different file system layout and a different method for locating the configuration/settings file. You need to place this file outside the location it is located in the uni-site configuration to have a multi-site. Being able to use multiple configuration/settings files with a single core installation is the key to having a working multi-site layout. Since different CMSes uses different methods for locating the configuration/settings files for the multi-sites, a "generic" solution is not possible.

However, if you can live with having to implement CMS-specific solutions (i.e. a different multi-site "library" for each CMS you're interested in, and a different scheme for linking the project site to this library for each CMS), you can have a multi-site.

Here are pointers to the relevant documention for the three CMSes you mention as examples:


As already mentiond by foxtrot there is the WordPress multiside feature.
There is also a multisite extension for Joomla.
Drupal has a built-in multi-site mechanism.


Since setting up a multi-site is not trivial, you need to read the documentation carefully for each CMS you're interesting in using for a multi-site. As I say initially, there is no "generic" solution for this.

10% popularity Vote Up Vote Down


 

@Nimeshi995

At least in WordPress you have the multisite feature...

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme