• Gå direkte til primær navigation
  • Skip til indhold
  • Gå direkte til primær sidebar

Vayu Robins

WordPress theme & plugin developer

  • Kompetencer/Services
  • Om/About
  • Kontakt/Contact

WordPress Multitenancy setup with DesktopServer

17. marts 2016 by Vayu Robins 2 kommentarer

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:

  1. 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.
    wp-config_php
  2. 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.
    site-structure
  3. Open and edit the “wp-config.php” file and add the following code: This will access all the files from the core.
    wp-config_php-subsite
  4. Open and edit the “index.php” file and change this line of code:
    index_php-subsite

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.

Del:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Like this:

Like Loading...

Skrevet i: WordPress

Læserinteraktioner

Kommentarer

  1. Matt skriver

    21. juli 2016 kl. 19:10

    Thanks for this. Very useful.

    I am wondering if you could explain how you symlinked the folders?

    Svar
    • vayu skriver

      22. juli 2016 kl. 12:48

      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.

      Svar

Skriv et svar Annuller svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primær Sidebar

Vayu

Vayu

I am a webdeveloper from Denmark. I make my living building WordPress websites, e-commece sites, custom themes, plugins and widgets.

Verified Services

View Full Profile →

Kategorier

  • Ikke kategoriseret
  • Kode
  • Plugin
  • WordPress
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

  • vayu.dk
  • Frederikssundsvej 49
  • 2400 København NV
  • +45 61 77 00 33
  • info@vrweb.dk

%d