Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Multisite: Lessons I Learned the Hard Way

987 views

Published on

Slides from the April 2015 WordPress Philly Meetup presentation on multisite, including considerations for setup, plugin selection and activation, theme modifications and network database cleanup.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Multisite: Lessons I Learned the Hard Way

  1. 1. Multisite: Lessons I Learned the Hard Way Susan Walker susanwrotethis@gmail.com www.linkedin.com/in/susanwrotethis
  2. 2. What is Multisite? Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. -- from wpbeginner.com
  3. 3. How Does it Work?
  4. 4. How Does it Work? Multisite relies on two elements: • lots of database tables • magic dust
  5. 5. Some WordPress tables found on a single-site installation
  6. 6. Some WordPress tables found on a multisite installation …
  7. 7. Some WordPress tables found on a multisite installation …
  8. 8. Some WordPress tables found on a multisite installation global tables
  9. 9. Some WordPress tables found on a multisite installation
  10. 10. The Magic Dust WordPress stores a unique ID and path for each blog in wp_blogs. As the multisite loads, WP uses this info to know which tables to pull content and settings from.
  11. 11. The Multisite Admin The multisite administrator is called the Super Admin. Instead of a site dashboard and admin menu, there will be a network dashboard and admin menu.
  12. 12. Multisite Terminology In multisite, an individual site is referred to as a blog. The terms “site” and “network” normally refer to the whole multisite.
  13. 13. Multisite Terminology Sites can run as subdomains… • www.example.edu • math.example.edu • history.example.edu • finearts.example.edu
  14. 14. Multisite Terminology … or as subdirectories: • www.example.edu • www.example.edu/math • www.example.edu/history • www.example.edu/finearts
  15. 15. Who Uses Multisite?
  16. 16. Who Uses Multisite? Multisite is a good fit if you have web sites with commonalities: • site purpose • content ownership • design (themes) • functionality (plugins)
  17. 17. Who Uses Multisite? Examples: • a professional group’s blogs • a chain with location-specific sites • an arts organization’s events • university department sites
  18. 18. Who Uses Multisite? It’s useful if you have a number of related sites, especially when you have limited resources with which to manage them.
  19. 19. WARNING Multisite documentation may be incomplete, outdated or missing entirely. You have to learn a lot of it by trial and error.
  20. 20. (Part of) the Missing Manual
  21. 21. I. Getting Started Will you: • have enough server resources? • use subdomains or subdirectories? • need wildcard SSL?
  22. 22. I. Getting Started Will you: • have enough server resources? • use subdomains or subdirectories? • need wildcard SSL?
  23. 23. I. Getting Started Will you: • have enough server resources? • use subdomains or subdirectories? • need wildcard SSL?
  24. 24. I. Getting Started Will you: • have enough server resources? • use subdomains or subdirectories? • need wildcard SSL?
  25. 25. II. Creating Sites Remember to: • use a site naming convention • avoid page and site naming conflicts
  26. 26. II. Creating Sites Remember to: • use a site naming convention • avoid page and site naming conflicts
  27. 27. II. Creating Sites Remember to: • use a site naming convention • avoid page and site naming conflicts
  28. 28. II. Creating Sites You can’t use slugs twice. That is, www.example.edu/biology can’t be both a page on the root site and a site on its own.
  29. 29. III. Managing Plugins You’ll need to: • see if a plugin is multisite-friendly • understand network activation • avoid plugin overload • consider activation access
  30. 30. III. Managing Plugins You’ll need to: • see if a plugin is multisite-friendly • understand network activation • avoid plugin overload • consider activation access
  31. 31. III. Managing Plugins Some plugins are built just for multisite, some aren’t but work on it fine, and others … not so much.
  32. 32. III. Managing Plugins How can you tell? • check the support forums • ask the developer • look in the uninstall file
  33. 33. Example 1 uninstall.php
  34. 34. Example 2 uninstall.php
  35. 35. III. Managing Plugins You’ll need to: • see if a plugin is multisite-friendly • understand network activation • avoid plugin overload • consider activation access
  36. 36. Network activation of plugins
  37. 37. Multisite Plugin Manager
  38. 38. III. Managing Plugins You’ll need to: • see if a plugin is multisite-friendly • understand network activation • avoid plugin overload • consider activation access
  39. 39. III. Managing Plugins You’ll need to: • see if a plugin is multisite-friendly • understand network activation • avoid plugin overload • consider activation access
  40. 40. Network settings for plugin menu
  41. 41. IV. Modifying Themes Never: • modify theme code directly • put non-theme code in functions.php
  42. 42. IV. Modifying Themes Never: • modify theme code directly • put non-theme code in functions.php
  43. 43. IV. Modifying Themes When you update a modified theme, your code changes will be overwritten. Use a child theme instead. Large multisites with specific branding needs should consider a custom theme.
  44. 44. Example custom theme
  45. 45. IV. Modifying Themes Never: • modify theme code directly • put non-theme code in functions.php
  46. 46. IV. Modifying Themes So, where do these changes go? Save them in a PHP file and drop it into: wp-content/mu-plugins
  47. 47. IV. Modifying Themes Must-use plugins make for a safe alternative to functions.php mods. • they load before regular plugins • they can’t be deactivated • they won’t be overwritten
  48. 48. Non-theme code mods
  49. 49. Must-use plugins
  50. 50. Must-use plugins
  51. 51. ∞-I. Cleaning Up WordPress is remarkable, but it’s not self cleaning. Be prepared to clear up the clutter that invariably accumulates over time.
  52. 52. ∞-I. Cleaning Up You’ll probably need: • an exit strategy for defunct sites • a plan to clear unused accounts • database maintenance tools
  53. 53. ∞-I. Cleaning Up You’ll probably need: • an exit strategy for defunct sites • a plan to clear unused accounts • database maintenance tools
  54. 54. ∞-I. Cleaning Up You’ll probably need: • an exit strategy for defunct sites • a plan to clear unused accounts • database maintenance tools
  55. 55. ∞-I. Cleaning Up You’ll probably need: • an exit strategy for defunct sites • a plan to clear unused accounts • database maintenance tools
  56. 56. ∞-I. Cleaning Up Plugins are available to remove: • options • cron jobs • roles and capabilities • orphaned tables
  57. 57. ∞-I. Cleaning Up Back up your database before you start!
  58. 58. ∞-I. Cleaning Up And don’t forget to dump unused media files from sites. A lot of requests for increased storage space would be unnecessary if people deleted their duplicate images.
  59. 59. What’s Still Missing?
  60. 60. More Missing Manual • managing roles and capabilities • finding good multisite tools • using scripts to update settings • automating maintenance with cron • writing sustainable, reusable code • sharing content across sites
  61. 61. Final Word of Advice Never test new themes, plugins or scripts directly on production.
  62. 62. The one thing that’s scarier than seeing the White Screen of Death on your site …
  63. 63. … is seeing it on all of them.
  64. 64. Susan Walker susanwrotethis@gmail.com www.linkedin.com/in/susanwrotethis

×