Why WordPress can’t be shared


I have about 6 different WordPress installs on my host. One for me, one for my company TSD and 3-4 for friends and family on sub domains. The issues I have with it are:

  • Upgrading is a pain
  • Sharing plugin-ins is a pain
  • Gets worse for every new blog I install

So I tried to modify the WP code so that it could be installed (and upgraded) in one place and then used for many blogs on the same server. I found out that as it stands WP‘s design doesn’t scale very well. I guess it wasn’t meant to, but when you work with it you get the feeling it could…


So I gave it a go and was half successful. Here what I did:

  1. In the index.php file I changed the PHP include path to point to the shared WP code base like so:
    $new_include_path = Array('/home/myaccount/public_html/wordpress', ini_get('include_path'));
    ini_set('include_path', implode(':', $new_include_path));
  2. I then had to go though a few 3-4 files and remove the use of the constant ‘ABSPATH’ as it wasn’t needed. Changing the include path really has its advantages here as PHP for the included file in the first directory of the and failing that the second and so on where as using constants in the code only gives you one shot at finding the file then you get the big nasty: ERROR!


This was all that was really required and the front end worked. There was a skinning problem but this is probably just a case of removing the ABSPATH again. If only WP did all of its including in one place!

Anyway, the reason I said that I was only half successful is because the backend is designed differently from the front. Where in the front end all requests are handled via the one index.php file in the admin each page is a separate file. At this point I gave up as each file that is called directly would have to be modified and uploaded to each install and you start to lose the benefit of a central shared WP install.


The front and backend are really doing the same thing on WP so they should concentrate on making them use the same template engine system for displaying. This would allow themes to be applied to the back as comprehensively as the front and also allow this type of modification.

It would also be nice to have a shared plug-ins folder as well as a site specific one mixed. This would require the WP code base to embrace the include path modification (which some servers don’t allow but they would if they could deploy one copy to many accounts/customers).

If anyone has a better approach I would be glad to hear it.

7 thoughts on “Why WordPress can’t be shared”

  1. Actually, come to think of it, what they should be doing is using an object to handle all the directory mapping, perhaps loading it from an XML file, then people could make custom file layouts i.e. code code is /wp/, plugins are at /blog/here/ and /wp/there/, themes are found /blog/content/themes etc

  2. I’m in the same boat – several WordPress installs, each requiring it’s own maintenance. In one case, I have several related sub domains, all running their own WordPress code base. I thought this was a silly expedient of mine, but not that I am looking at an application where it would be very desirable to have one WordPress code base for an arbitrary number of domains, I am seriously interested in this issue.

  3. Well,

    It seems Drupal can do it. You can have shared modules (like WP plugins) and site specific modules. Each site can have its own copy of the DB or they can share some or all of it, thus you can have shared logins across all the site (or not).

    Its really a far better design, code wise that it. It can emulate all the WP stuff. I’ll migrate this blog to Drupal once I have the time, although I still like to keep my hand in on WP as there are some good ideas worth stealing from it… some times :)

Comments are closed.