Wordpress multisite

2,302 views

Published on

A down and dirty multi-site tutorial

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,302
On SlideShare
0
From Embeds
0
Number of Embeds
51
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Wordpress multisite

  1. 1. Using WordPress<br />Multi Site as a<br />Development Environment<br />Jeff McNear<br />plasterdog.com<br />jeff@plasterdog.com<br />@plasterdog<br />847/849-7060<br />
  2. 2. Development location requirements:<br /><ul><li>Visible to the client
  3. 3. Hosted at a controlled location
  4. 4. Control over user permissions
  5. 5. Quick deployment & modification
  6. 6. Minimal impact on hosting resources</li></li></ul><li>If Wordpress development sites are deployed individually, each site would require all the core files and a unique database.<br />However there are only a couple of aspects that make each site unique:<br /><ul><li>The theme being used
  7. 7. The activated plugins
  8. 8. The actual content portion of the site</li></ul>All other aspects can easily be shared across a Multi Site deployment<br />
  9. 9. As of WordPress 3.0:<br /><ul><li>Wordpress MU capability is included in a standard install
  10. 10. Can be activated in four steps
  11. 11. Fast deployment of new sites
  12. 12. Single database
  13. 13. Single location for themes & plugins
  14. 14. Easily exported to “live” location</li></li></ul><li>Before getting started:<br /><ul><li>Sub domain (sub.multisiteURL) – requires VPS or dedicated host
  15. 15. Sub directory (multisiteURL/sub) – scheme for local or shared hosting
  16. 16. Verify mod_Rewrite is active
  17. 17. Best with fresh install
  18. 18. Before activating multi-site associate the “root” site with desired URL</li></li></ul><li>My first steps for any newly created WordPress site:<br /><ul><li>Delete sample post
  19. 19. Delete sample page
  20. 20. Delete sample comments
  21. 21. Delete sample links
  22. 22. Verify site name & slogan
  23. 23. Set permalinks scheme
  24. 24. Set screen preferences
  25. 25. Leave default category alone</li></li></ul><li>Edit wp-config.php file (under root of install)<br />default:<br />edited:<br />
  26. 26.
  27. 27. If you are in a VPS or dedicated hosting environment, you are given the option to select sites as sub-directories or sub-domains.<br />If you are working locally or on a shared host, this selection has been made for you.<br />
  28. 28. 3 further instructions:<br /><ul><li>Create a new directory (blogs_dir) within the wp-content folder
  29. 29. Insert additional code into the wp-config.php file
  30. 30. Insert a piece of code into the (root) .htaccess file</li></ul>(code is dynamically generated based on install)<br />
  31. 31.
  32. 32. The purpose of the blogs_dir insertion is to provide a location for the media library structure. A folder for each site is dynamically created.<br />
  33. 33. Network Administration controls:<br /><ul><li>Theme upload & activation
  34. 34. Plugin upload
  35. 35. Updates
  36. 36. Site creation
  37. 37. Some aspects of user administration</li></ul>Everything else is controlled on a site by site basis!<br />
  38. 38. A single complaint: The navigation to the network admin panel is not immediately evident!<br />
  39. 39. Themes are uploaded into the multisite “root” and must be “network enabled” before they can be applied to a site<br />
  40. 40. Plugins are also uploaded into the “root” and can also be “network activated” but can be selectively activated on a site by site basis: <br />
  41. 41. You now have a completely stable development environment for multiple individual wordpress sites. <br />Any network enabled theme can be used.<br />Any uploaded plugin can be accessed.<br />
  42. 42. To create a new site:<br />=> Sites => Add New => Create a New Site<br />
  43. 43. <ul><li>name site => populate title => populate admin email</li></ul>(must be a pre-established user – should be “root” user)<br />
  44. 44. Access site controls via “root”:=> Sites => All Sites => Select “Dashboard” for desired site<br />Access controls directly: rootURL/sub/wp-admin <br />
  45. 45. Each newly created site will then be editable like any other wordpress site, with a few exceptions:<br /><ul><li>Only Network Enabled themes can be used
  46. 46. Only those plugins inserted via the Network admin can be used
  47. 47. …. and a couple of user management options … </li></li></ul><li>Standard user controls are available for every “sub” site:<br />
  48. 48. Additional option in multisite: “Add existing user”<br />
  49. 49. Once a user exists in the structure, that user can be associated with multiple sites – and with different permissions<br />
  50. 50. Preparing a site for export:<br /><ul><li>Verify that all components are fully updated
  51. 51. Make note of plugins used
  52. 52. Make note of widget configuration and contents</li></ul>Then from the site’s admin:<br /><ul><li>Tools
  53. 53. Export
  54. 54. All Content
  55. 55. Download export file to desired location</li></li></ul><li>The output of this export is an XML file that is generally small – but for a larger site this can create an issue<br />The php.ini file by default limits file upload size to 2mb – which wordpress further limits to 1.46mb<br />If you can’t edit the php.ini file on your server, you can export the data in pieces.<br />While a date range division is offered, it isn’t reliable. It is better to segment by category.<br />
  56. 56. Importing the site to the “live” location:<br /><ul><li>Prepare fresh wordpress install
  57. 57. Upload and activate developed theme
  58. 58. Upload and activate plugins</li></ul>Then:<br /><ul><li>Tools
  59. 59. Import
  60. 60. Navigate to saved .xml file
  61. 61. Import/absorb author(s)
  62. 62. Check “download and import attachments</li></li></ul><li>
  63. 63. The imported data will include:<br /><ul><li>All pages, posts, and their contents
  64. 64. Page (and post) template assignments
  65. 65. Media library contents
  66. 66. Categories and their definitions
  67. 67. Created menus
  68. 68. Users attached to site</li></li></ul><li>The import will NOT include:<br /><ul><li>Widget placement not defined by theme files
  69. 69. Site title & slogan
  70. 70. “Blogroll” inserted links
  71. 71. Text widgets inserted via widget panel
  72. 72. “Home” page setting</li></li></ul><li>Benefits of using multi-site for development:<br /><ul><li>A single database
  73. 73. A single place for updates
  74. 74. Centralized plugin depository
  75. 75. Ability to apply certain plugins by default
  76. 76. Rapid site deployment
  77. 77. Perfect location for site archives
  78. 78. Perfect location for testing updates, new plugins, etc.</li></li></ul><li>

×