powering 180+ domains with a single instance of wordpress (w/o multi-site)
TRANSCRIPT
![Page 1: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/1.jpg)
&
Scott McCollumExtension Information [email protected] | @scottmccollum
Mike VysockaExtension Information Technology
[email protected] | @thewebvy
![Page 2: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/2.jpg)
1997
Through the years ...
2004
![Page 3: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/3.jpg)
2005 2010
![Page 4: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/4.jpg)
2012
![Page 5: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/5.jpg)
![Page 6: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/6.jpg)
● Thousands of pieces of content to move● Update and request new DNS entries● Setup tons of 301 Redirects, RedirectMatch● Actively communicate with users● Provide training for users
![Page 7: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/7.jpg)
What did WordPress give us?
● A real Content Management System● Blogging: Point, Click, Publish● Core Updates● A huge user community ● ...
![Page 8: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/8.jpg)
Could a single Wordpress instance, without any plugins, and just a single theme keep 100+ site owners happy
?
BUT …
and no, we’re not using WordPress MU
![Page 9: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/9.jpg)
YES
![Page 10: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/10.jpg)
184 domains created
strawberries
pender growingsmallfarms
www.ces.ncsu.edu
148 are live today.
mecklenburg
![Page 11: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/11.jpg)
651 usershave published or edited content
19,000 pages/posts currently published
6,500,000 page views since launching July 1, 2012
As of April 2014 ...
![Page 12: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/12.jpg)
![Page 13: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/13.jpg)
October 25, 2013
We went mobile
![Page 14: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/14.jpg)
* .ces.ncsu.edu domainsalamance - alexander - alleghany - als - anr - anson - ashe - avery - beaufort - bertie - bladen - blueberries - brunswick - buncombe - burke - cabarrus - cabbage - caldwell - calsleadership - camden - carteret - caswell - catawba - chatham - cherokee - chowan - clay - cleveland - colecrops - columbus - communitydevelopment - conference - cotton - craven - cucurbits - cumberland - currituck - cutflowers - dare - davidson - davie - duplin - durham - ebci - edgecombe - eggplant - energy - entomology - eod - espanol - evaluation - extensiongardener - fcs - fieldtoschool - floriculture - foodsafety - forsyth - franklin - gardening - gaston - gates - giving - graham - granville - grapes - greene - greenhousecrops - greens - growingsmallfarms - guilford - halifax - harnett - haywood - henderson - hertford - hoke - horticulture - hyde - intranet2 - ipm - iredell - jackson - johnston - jones - lee - lenoir - lettuce - lincoln - localfood - macon - madison - marketingtoolkit - martin - mcdowell - meatgoats - mecklenburg - mitchell - montgomery - moore - nash - nc10percent - ncce100years - ncchoices - nccommunitygardens - ncdisaster - ncstepstohealth - newhanover - northampton - northcentral - northeast - onslow - orange - pamlico - pasquotank - peaches - pender - peppers - perquimans - person - pesticidenews - pitt - plantpathology - poinsettias - polk - postharvest - poultry - poultry4hyouth - randolph - registration - richmond - robeson - rockingham - rootcrops - rowan - rubus - rutherford - sampson - scotland - shellfish - soils - southcentral - southeast - soybeans - spinach - stanly - state - stokes - strawberries - surry - sustainability - swain - sweetpotatoes - therapeutic-hort - tobacco - tomatoes - transylvania - tyrrell - union - vance - vegetables - wake - warren - washington - watauga - wayne - weeds - west - wilkes - wilson - yadkin - yancey
![Page 15: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/15.jpg)
How does it work?
![Page 16: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/16.jpg)
We use all 4th level domainssomeName.ces.ncsu.edusomeOtherName.ces.ncsu.edu... yes, we use 180+ of them.
You could easily do this for your domainmySiteName.myuniv.edumySiteName2.myuniv.edu... ^ and, they don't even have to be fourth level!
![Page 17: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/17.jpg)
Using DNS, every sub-domain is aliased to the same server
![Page 18: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/18.jpg)
![Page 19: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/19.jpg)
http://wolfpack.ces.ncsu.edu
$_SERVER[“HTTP_HOST”]
echo preg_replace(“/\.ces\.ncsu\.edu$/”, ‘’, $_SERVER[“HTTP_HOST”] );// prints “wolfpack”
![Page 20: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/20.jpg)
![Page 21: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/21.jpg)
Keep it simple.Do your best to avoid one-off feature requests, use a common header / footer with only slight variations. Can the code you write be used on 10 or more domains?
![Page 22: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/22.jpg)
lines of code in our theme’s functions.php file handle the edge cases, quirky requests, custom views, and self-imploding ideas our 650+ users have for their 180+ websites
1900
/* and about 15% of those lines are comments! */
![Page 23: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/23.jpg)
Creating a new site is easy.1. We get a DNS entry for the new domaini.e. wolfpack.ces.ncsu.edu
2. We create a Wordpress user named wolfpack, just as you normally would. This creates an entry in wp_users
![Page 24: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/24.jpg)
We use our campus authentication to supersede the native Wordpress login
But you could just as easily use OAuth, LDAP, htaccess, etc.
You could argue, this adds a layer of security.
But really, we're just using it so we can map multiple real users, real people and their logins to a single wordpress user.
![Page 25: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/25.jpg)
3. We create an access table in the Wordpress database that will map organizational userIDs to a particular Wordpress username in the wp_users table.i.e. an email address, eXtensionID, unityID
user_id wp_user_login access_level
[email protected] wolfpack editor
[email protected] sweetpotatoes editor
[email protected] wolfpack admin
![Page 26: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/26.jpg)
Having multiple folks sign in under the wordpress user ‘wolfpack’ makes author
attribution messy.
Use wp_postmeta table
![Page 27: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/27.jpg)
4. Create another custom table with some meta data about each of your sites.
![Page 28: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/28.jpg)
You can choose to leverage Wordpress' wp_usermeta table instead
![Page 29: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/29.jpg)
Use native Wordpress functions (hooks, actions, filters)
● get_post_meta()● get_author_meta()● get_posts($args)● get_usermeta()
Or write your own ...● __get_site_type()● __get_site_name()● __get_author_ldap()
![Page 30: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/30.jpg)
portal
county
county
if($siteType == ‘portal’){
get_full_banner();
}elseif($siteType == ‘county’){
get_color_block();get_small_banner();
}
1 theme, and a few small tweaks
the codethe visual
![Page 31: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/31.jpg)
We put every WordPress author on an island
![Page 32: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/32.jpg)
Use Wordpress' built-in filters and actions behind the scenes
![Page 33: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/33.jpg)
![Page 34: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/34.jpg)
● Centralized Google Analytics● Content Sharing● Content QA● Faster Feature Rollouts● Wider, Faster A/B Split Tests● Easier Access Control● One Stop Publishing
BIG Benefits to being under the same umbrella
![Page 35: Powering 180+ domains with a single instance of Wordpress (w/o Multi-site)](https://reader030.vdocuments.mx/reader030/viewer/2022032420/55a4ee161a28ab26408b4602/html5/thumbnails/35.jpg)
Link to these slides:go.ncsu.edu/wordpress
How did we do?joind.in/9879