“We’ve all built a ton of WordPress sites. We’ve also managed them all too. You’ve probably heard about WordPress Multisite Networks, and all the awesome things it can (and can’t) allow you to do.
With great power, comes great responsibility. During this talk, Taylor will step through the do’s and don’ts of Multisite Networks. He will share how WordPress Multisite can be your best friend or worst enemy… but usually both… at the same time.”
Learning Outcomes:
Expect pro-tips, eureka moments, and hard lessons learned from his experience setting up and running multisite networks for small private company intranets, all the way to global enterprise brands.
By the end of this talk you will know the pros and cons of WordPress Multisite Networks, best practices for setting up and running a multisite, and know about alternatives if multisite isn’t a fit for your next project.
Presented by Taylor McCaslin at WordCamp Toronto on October 3, 2015.
1. @Taylor4484 #multisite #WCTO
Best Friend ||
Worst Enemy
Multisite Network
Do’s & Don’ts
presented by Taylor McCaslin
at WordCamp Toronto
on October 3, 2015
3. @Taylor4484 #multisite #WCTO
Technical Product Manager
UX Designer
Interaction Designer
BA, Theatre & Dance
Certificates in Business, Computer Science,
Digital Art & Media
Taylor McCaslin
4. @Taylor4484 #multisite #WCTO
Disclaimer
● My advice is based on my experience with what has
worked for me in the past
● Every project is unique
● There is an exception to every rule I makeup
● Plugins will do everything I say multisite won’t or shouldn’t
5. @Taylor4484 #multisite #WCTO
What people are saying
● “I tried to use multisite to manage multiple sites and
just got myself confused”
● “Multisite is amazing, why would anyone not use it?”
● “Multisite is hard”
● “We had a project that was running multisite and we
converted it to a standard wordpress install”
● “I don’t use anything but multisite”
6. @Taylor4484 #multisite #WCTO
How it’s being used
“Multisite is now a utility for managing multiple sites using
one installation, where as the original vision was to enable
blogging networks“
@jjj on make.wordpress.org/core
10. @Taylor4484 #multisite #WCTO
What is Multisite?
● A multisite network is a collection of site that all share the
same single WordPress installation
● Terminology
○ Install: an instance or installation of WordPress
○ Network: a set of subsites that operate within the single WordPress
install configured for multisite
○ Site: one of the subsites in the multisite network
11. @Taylor4484 #multisite #WCTO
What ISN’T Multisite?
● A network of sites that can be moved to separate hosts
○ 1 host. 1 install of WordPress. Many sites.
● A set of sites that can easily be separated into their own
WordPress installs
○ trust me, modifying serialized data is not fun
● A set of sites that can have different IP addresses
○ see the first point
12. @Taylor4484 #multisite #WCTO
A big happy multisite apartment
Multisite networks are like apartment complexes.
● Shared roof (hosting)
● Common spaces (filesystem)
● Private apartments (sites)
Be a good neighbor
Don’t trust strangers!
Always Lock your apartment door
14. @Taylor4484 #multisite #WCTO
Open or Closed Site?
● Terminology is hard…. and confusing
Public Network / Untrusted
● Anyone can signup and create a site
(sometimes paid)
○ WordPress.com
○ Happytables.com
○ University Student Blogs
● Concerns:
○ file types / uploads
○ scripts / embeds
○ copyright / DMCA
Private Network / Trusted
● Limited site and user creation
○ Wordcamp.org
○ Company intranets
○ University network
■ colleges ,department, etc
● Concerns:
○ too many cooks
○ or none at all
○ code changes affect all sites!
17. @Taylor4484 #multisite #WCTO
Unified Site Management
● Super Admin Role
● manage_network
● manage_sites
● manage_network_users
● manage_network_plugins
● manage_network_themes
● manage_network_options
● unfiltered_html
codex.wordpress.org/Roles_and_Capabilities
18. @Taylor4484 #multisite #WCTO
Shared Users
● All blogs have central user management
● Users login once to access all sites on the network
○ Doesn’t play well with 2FA plugins
■ You’ll login for every site
■ Duo2, Google Auth, Two Factor Auth, etc
21. @Taylor4484 #multisite #WCTO
Shared Themes
● Add a theme
○ Network Enable (all sites)
○ Restrict themes available to use
per site
■ Done through the Site -> Edit Site
menu in network admin
● Changes to one theme
WILL affect all sites using it
23. @Taylor4484 #multisite #WCTO
Shared Plugins
● Install plugins on the network (for your site admins)
○ Activate per site (wp-admin)
○ Network Activate (network admin)
● Must Use Plugins
○ Can’t be deactivated through the admin
25. @Taylor4484 #multisite #WCTO
File Structure Differences
❏ wp-config.php has extra lines
❏ .htaccess has extra lines
❏ wp-content/sunrise.php if you are using domain mapping
❏ wp-content has extra subfolders
26. @Taylor4484 #multisite #WCTO
File Structure Differences
Pro tip: rely on host to
allow you to grant
your site admins
access to only specific
site directories
28. @Taylor4484 #multisite #WCTO
Tables in ONE multisite DB
(10 + 6 + (N * 8)) where n is number of sites
1 site = 24 tables
10 sites = 96 tables
100 sites = 816 tables
1,000 sites = 8,016 tables
10,000 sites = 80,016 tables
95,000,000 sites = 296,000,016 tables WordPress.com, July 2015
29. @Taylor4484 #multisite #WCTO
Choosing the right Hosting
● Use a managed host
● Pro-Tips:
○ automatic backups with 1 click restore (ability to download backup)
○ built in staging sites (that magically with the networked sites)
○ granular deploy to production controls (deploy only specific tables)
○ look for extra security features (like automatic ip blacklisting)
○ know limitations (some hosts don’t allow subdomains or subfolders)
○ use version control
● MMSN (massive multisite network)
○ plan to spend $$$$ or hire a sysadmin
30. @Taylor4484 #multisite #WCTO
Pro Dev Do’s
● define('DISALLOW_FILE_EDIT', true);
○ disable the Admin File Editor
● define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true );
○ For large sites: prevents dbDelta() and the upgrade functions from
doing expensive queries against global tables
31. @Taylor4484 #multisite #WCTO
Multisite Plugin Developer Do’s
● Consider your Network and WP-Admin settings
○ Split out these settings if needed
● Cleanup site options on delete
○ delete_site_option( $option_name );
○ can be expensive
● Cleanup custom site tables on delete
● Consider how licensing will work for Networks
32. @Taylor4484 #multisite #WCTO
Pro Dev Do’s
● add_action( ‘network_admin_menu’, ‘my-settings’ );
○ add extra submenus and menu options to the network admin panel'
34. @Taylor4484 #multisite #WCTO
Pro Dev Dont’s
● current_user_can(‘unfiltered_html’)
○ “Allows user to post HTML markup or even JavaScript code in pages,
posts, comments and widgets.”
○ Just don’t. You will regret this.
● loop through your network sites
○ Unless you know what you’re doing, you’ll cripple your site
performance, if not crashing your site altogether.
36. @Taylor4484 #multisite #WCTO
To multisite or not?
“I want to allow users to create their own sites within a
network with some constraints”
37. @Taylor4484 #multisite #WCTO
To multisite or not?
“I want to allow users to create their own sites within a
network with some constraints”
● Use Multisite!
○ This is what multisite was made to do, and it does it well!
● Pro-Tip: customize the admin!
○ WordPress.com
○ Happytables.com
40. @Taylor4484 #multisite #WCTO
To multisite or not?
“I want to centrally manage all my client’s sites”
● Don’t use Multisite
● Alternatives:
○ Jetpack Site Management (update plugins across your site)
○ WP Remote (free, hosted)
○ Manage WP (premium, hosted)
○ Infinite WP (free, self-hosted with paid addons)
○ WP-CLI (script your way to site nirvana)
41. @Taylor4484 #multisite #WCTO
To multisite or not?
“I want to have a multisite network where each site is in a
different language”
42. @Taylor4484 #multisite #WCTO
To multisite or not?
“I want to have a multisite network where each site is in a
different language”
● Maybe Multisite, Maybe Not
● SEO optimization can be difficult when similar content
is across a network of sites
○ Pro-tip: hreflang tags and canonical links are your friend
● Plugins like WPML are built specifically to do this
43. @Taylor4484 #multisite #WCTO
To multisite or not?
“I have a lot of content that is very different, and I want all
my sites to look different, but it’s still all my content”
44. @Taylor4484 #multisite #WCTO
To multisite or not?
“I have a lot of content that is very different, and I want all
my sites to look different, but it’s still all my stuff”
● Most likely not Multisite, but maybe
● Map domains to categories and tags
● Create custom templates for custom posts types, and
category archives
45. @Taylor4484 #multisite #WCTO
Best Friend ||
Worst Enemy
Multisite Network
Do’s & Don’ts
presented by Taylor McCaslin
at WordCamp Toronto
on October 3, 2015