Recently I came across a video presentation about WordPress Multitenancy that described a great solution to an issue I have been looking for for a while. On my computer I have a lot of individual WordPress installs setup. Every time I build a website for a client, I first install WordPress on DesktopServer and add all the plugins and theme that I need for that site. That means I have hundreds of WordPress installs, many with the same plugins and themes in every install. Maintaining and updating all these plugins etc. requires a lot of time. But after seeing Cliff Seal’s presentation where he showed a way to have just one WordPress install for all the sites that run on the local server. Wuuhhuu!
I set out to do exactly like Cliff explained in the video presentation, but came a cross some obstacles on the way and I thought I would just describe in detail how I got it all working on my computer with DesktopServer.
Here is how I set it up:
- The main site that contains all the core files, plugins and themes, is simply set up as normally. There is only one thing you need to change in the wp-config.php file. Add the following line of code in the very top of the file.
- All other sites file structure should be like this screenshot. The “wp” folder is a symlink to the main site. The “wp-content” folder is renamed to “content”. The “wp-plugins”, “plugins” and “theme” folders inside the content folder are also symlinks to the main directory.
- Open and edit the “wp-config.php” file and add the following code: This will access all the files from the core.
- Open and edit the “index.php” file and change this line of code:
That’s basically it. Now go run all your websites off of one installment and save a lot fo disc space and time updating plugins, themes and core files.
Thanks for this. Very useful.
I am wondering if you could explain how you symlinked the folders?
On a Mac/OSX I just right click the folder and chose the Make Alias button. I am not sure how to do it on Windows.