Managing Multiple Sites with WordPress Network

Here you are, a web developer currently working on several different WordPress sites at varying stages of development. They’re all in different directories on your domain so clients can have a look and see how they’re coming along. Out of nowhere, a major new WordPress version is released, and the Genesis framework you’re using to build all your sites needs to be updated.

Managing all your WordPress installations at a times like this can be a real hassle. This may not be your exact story, but I’m sure many of you can sympathize.

WordPress Network comes to the rescue in situations like this. Once you’ve set it up, you can put multiple sites in directories and subdomains with the click of a button. Since they all share the same WP installation you can update and edit them all in one fell swoop from your Network Admin dashboard.

Before you start, unless this is a brand new WordPress installation with nothing to lose, you’ll probably want to back up your database and files. You also need to disable any active plugins. You can start them back up after the network setup is complete.

Now for the nuts and bolts of creating a new WordPress Network.

First you’ll need to enable Multisite. Use your FTP client or web server’s file browser and download a file called wp-config.php and save it to your desktop or a folder. Open it with your text editor and add this line above where it says "/* That's all, stop editing! Happy blogging. */".

define('WP_ALLOW_MULTISITE', true);

Save the file and upload it back to the server. Since the original wp-config.php is still there, it will ask you which file you want to keep. Choose “replace” or “overwrite” to save the newer, edited version.

You’ll need to refresh your admin panel in your browser to let these changes take effect.

In your Tools menu in the left sidebar, you’ll now see the Network Setup item. Click on that and then go to Create a Network of WordPress Sites. Follow the directions and choose a few options such as the URL structure and network name.

You’ll then be prompted to make a blogs.dir directory in /wp-content and it will provide several more lines of code to add to the wp-config.php file.

It will also tell you to add some rules to .htaccess, a server text file used to work with permissions and configurations for each directory.

Use your FTP program of choice to download this file. You may need to tell your FTP program not to hide this file, which you should be able to specify in the program’s options or preferences.

Even when you have downloaded the file, you may find your operating system’s file manager hides the file from you, so here are some directions for how to show it.

Mac

Open Terminal, found in Applications/Utilities.

Type/paste in this and hit return/enter:

defaults write com.apple.finder AppleShowAllFiles -bool true

Finder must be restarted to allow this to take effect. In Terminal paste in this and hit enter:

killall Finder

When you’re done, if you’d like to hide hidden files again, use the same line as used to hide it, but change “true” at the end to “false” and restart Finder.

Windows

Press the Start menu. Click on Control Panel, Appearance and Personalization, and then Folder Options. Go to the View tab. Under Advanced Settings, select “Show hidden files and folders” and hit “OK“.

Once you have shown hidden files, open .htaccess and add the code given by WordPress Network Setup, save the file and re-upload it.

It is possible that this file has not already been placed on your website. If, after setting your FTP program to display hidden files, you still don’t see the .htaccess file in your website’s root public directory, you’ll need to create a new one.

Create a new file in your text editor, paste in the code given by WordPress Network Setup, save that as .htaccess to your desktop or a folder, and upload it to the server, in the root public directory of your website.

When you log into the Network Admin, you’ll now see a “My Sites” item. Hover over that, and under “Network Admin”, there will be several administration items. When you click on “Sites”, you can add new sites with the click of a button!

Back under the main “My Sites” menu, you can manage all the network sites.

Setup is complete!

Now, with your WordPress network, updating and making changes to all your sites is simple and far less time-consuming.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Nathan

    Wow, the windows instructions are a lot longer the the Mac instructions. No surprise there.

    • http://codechirps.com/ Daniel

      Well, no, actually the Mac instructions are a little longer. The Windows instructions are just that one paragraph and then after that it’s back to the WordPress Network installation instructions.

      But in plenty of cases it is true that Windows computers require many more steps than a Mac in order to complete the same task.

      Thanks for reading! ;)

      • http://twohourblogger.com Martyn Chamberlin

        Lol, just goes to show how quickly people scan articles these days.

        Great job Daniel! You’ve done a great job here.

    • Alex

      Apple is a blight on society.

      • http://codechirps.com/ Daniel Shamburger

        Absolutely wrong there, my friend! ;)

        They’re products are great, but the “fanbois” do resemble that remark.

  • http://niteodesign.com Blake Petersen

    Great article, my company is planning on migrating all of our brand blogs over to WordPress and this would be a perfect application for a WordPress Network set-up.

    Also, gotta love those Apple fanbois… So eager to validate their fanboidom… no surprise there! ;]

  • http://www.kangtanto.com kangtanto

    Thank you for the explanation. I’ve been looking for such article to solve some problems on my wordpress site.

  • http://www.vermarc-custom.com.au Steven

    Great article Daniel, we manage several company sites built on wordpress and I wasn’t aware of this feature previously.

  • http://joezimjs.com Joe Zim

    I love using Multisite for WordPress. The company I work for uses it quite often to group related client sites. Heck we even did the Packers Hall of Fame and each player in the hall of fame had their own website in the multisite, which made it MUCH easier to set them all up. (e.g. Gilbert Brown’s site)

    • http://codechirps.com/ Daniel

      Nice, that’s a terrific example of how useful a WP Network can be!

  • http://www.kksblog.com Uddhava

    One thing that isnt clear to me is the following;

    Can this multisite feature be used to maintain WP installs that are remote, iow on differents servers spread around different isp’s? Or does this work locally only?

    • http://codechirps.com/ Daniel

      I’m afraid not. WordPress Network is only for multiple sites on the same domain.

      • http://www.optimalworks.net/ Craig Buckler

        That’s not quite right. A WP network can manage any number of sites on different domains, sub-domains or paths. However, they must all reside on the same server.

      • http://codechirps.com/ Daniel

        Really Craig? Sorry, I didn’t mean to provide false information.

        How would one go about using a WordPress network on multiple domains?

      • Christophe

        Hi Guys,

        WP multisite can manage any number of sites on different domains, subs etc… using domain mapping plugin : http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  • http://www.clickclickmedia.com.au Phil

    I moved to doing dev work on a mutisite, as it seemed like a great solutions to messy multiple installs and login creds. It also with domain mapping allows the creation of landing pages to be very convenient. However the first few sites that I had to move off onto their own install was a **real ** headache until I got the hang of it.

  • http://example.com sukago

    Hi Daniel,
    I have a site built on wordpress. Now we plan to add ecommerce to it and I want to add store.example.com. Can I use wordpress network there and have two independent sites without affecting the original one.
    Please let me know.
    Sukago.

    • http://codechirps.com/ Daniel Shamburger

      Yes, I believe that would work fine. For example I have my site at codechirps.com and a WordPress network installed at demo.codechirps.com to demo my themes. I just have one now, at demo.codechirps.com/codechirps.

      You can just make the subdomain “store” through cPanel or whatever system your server uses.

      • http://www.lawnmowing-auckland.net.nz/ Mowing

        How safe is having ecommerce inside a WordPress site?
        I’ve heard it’s risky and that WordPress is vulnerable to hackers.

        Back to the article… I’m looking into WP multi myself (have 5 sites), but there seems to be a bit of work to set them all up. I have some good plugins (not too many), but they’ll require new data entry when re-activating.

        Do you think multi will save a lot of time for me?

        Still trying to get my head around it… but thanks for your article.
        Do you have any video tutorials?