the often useful somewhat annoying world of wordpress multisite

20
@jamesbundey THE OFTEN USEFUL SOMEWHAT ANNOYING WORLD OF WORDPRESS MULTISITE WordPress Developer Meetup Melbourne - April 2016 James Bundey

Upload: james-bundey

Post on 27-Jan-2017

99 views

Category:

Education


0 download

TRANSCRIPT

Page 1: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

THE OFTEN USEFUL SOMEWHAT ANNOYING WORLD OF

WORDPRESS MULTISITEWordPress Developer Meetup Melbourne - April 2016 James Bundey

Page 2: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 3: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

When to use itWhy Multisite?

Page 4: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

The Pros

• One core WordPress installation

• Simplifies management because everything is controlled via one dashboard

• Scalable

• Sites run independently of each other

Page 5: The Often Useful Somewhat Annoying World of WordPress Multisite

@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.

Page 6: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

So, where is it a winner?

Page 7: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 8: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

Developing for Multisite

Page 9: The Often Useful Somewhat Annoying World of WordPress 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

Page 10: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 11: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 12: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

Some tips

Page 13: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 14: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 15: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 16: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

Useful Plugins

Page 17: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

• Sub Domain setup

• WordPress MU Domain Mapping

• Managing Users

• Multisite User Management

• Unconfirmed

• Cloning Sites

• Multisite Clone Duplicator

Page 18: The Often Useful Somewhat Annoying World of WordPress Multisite

@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

Page 19: The Often Useful Somewhat Annoying World of WordPress Multisite

@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]

Page 20: The Often Useful Somewhat Annoying World of WordPress Multisite

@jamesbundey

Thank You Any questions?