the often useful somewhat annoying world of wordpress multisite
TRANSCRIPT
@jamesbundey
THE OFTEN USEFUL SOMEWHAT ANNOYING WORLD OF
WORDPRESS MULTISITEWordPress Developer Meetup Melbourne - April 2016 James Bundey
@jamesbundey
Some Background
• Developing on WordPress for 6+ years
• Build custom websites for clients
• Manage a number of websites on an ongoing basis
• Look after quite a few multisite installs
@jamesbundey
When to use itWhy Multisite?
@jamesbundey
The Pros
• One core WordPress installation
• Simplifies management because everything is controlled via one dashboard
• Scalable
• Sites run independently of each other
@jamesbundey
The Cons
• One core WordPress installation - multiple site = more risk
• One dashboard can lead to all kinds of issues (death by plugin)
• Scalability also means that it can become big…quickly
• Sites are, but also aren’t really, independent of each other. How do you balance those that are extremely resource heavy.
@jamesbundey
So, where is it a winner?
@jamesbundey
Typical Scenarios
• Large clients with numerous child companies who need individual sites.
• Clients that want multiple region specific sites
• Clients that want to share information across sites
• Clients that like to make radical changes to their site on a regular basis
@jamesbundey
Developing for Multisite
@jamesbundey
Think it through• Understand how you intend to structure it
• Sub-domain vs sub-folder
• How are you going to theme it
• Master theme with options panel vs child themes
• If it’s a pre-purchased theme how much crap is it going to load
• Be very selective with plugin choices - does it support multisite
• Who is responsible for managing it
• Can the client be trusted
@jamesbundey
Development workflow• No different to how I would treat a single site build
• Local installation set-up on vagrant
• Make master install a dummy site
• Update site URL when creating new sites locally
• Theme managed via git repo
• We use a lot of ACF to build the structure (often a Flexible build)
• Try to keep it as universal as possible
• Options panel built on ACF
@jamesbundey
However…• Multisite loves to throw issues at you, especially if you need to
manage and update on an ongoing basis
• Migrating from local and production
• Setting up a staging site isn’t always an option
• Backups are a pain
• Domain mapping, records alias etc, if you’re using sub domains
@jamesbundey
Some tips
@jamesbundey
Migrations• Sometimes there’s nothing wrong with doing it the old fashioned way
• Find & replace and phpAdmin import
• Small updates are completed manually
• Large content changes, just create a new site
• We use Migrate DB Pro if we need to sync between production and local
• Will only pull and update the master install, so you need to remember to update settings for sites
• Update local host file with sub-domains
@jamesbundey
Theme updates
• We set-up a second theme within the installation.
• Changes are deployed to this theme using either a gulp task or Beanstalk when changes are committed to the repo
• Tested on live site
• Redeploy to master theme once happy
@jamesbundey
Backups & Hosting• WordPress Backup to Dropbox plugin
• A lot of premium backup tools will fail. Vaultpress is an option, but you pay per site.
• Find a decent host.
• Set-up your own VPS if you know what you’re doing
• Premium WordPress hosting - we use Flywheel for multisite
• Use a decent caching tool
• WP Rocket and integrate with Cloudflare
• Look into a CDN - Delicious Brains WP Offload S3 for use on AWS
@jamesbundey
Useful Plugins
@jamesbundey
• Sub Domain setup
• WordPress MU Domain Mapping
• Managing Users
• Multisite User Management
• Unconfirmed
• Cloning Sites
• Multisite Clone Duplicator
@jamesbundey
• Content management
• Multisite Post Duplicator
• Great for creating news items that can automatically posted across all sites.
• Network Shared Media
• Security
• Login Security Solution
• iThemes Security Pro / WordFence
@jamesbundey
.htaccess
• Important to remember this is controlling every site.
• If it get hacked it’s going to take down every site
• 301’s can’t be treated as normal
RewriteCond %{HTTP_HOST} !^url_address.com.au$ [nc]
RewriteRule .? - [S=2]
RewriteRule ^contact\.aspx$ http://url_address.com.au/contact [R=301,NC,L]
RewriteRule ^about-gt\.aspx$ http://url_address.com.au/about-us/company-profile/ [R=301,NC,L]
@jamesbundey
Thank You Any questions?