SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Using multi-tenant WordPress to
simplify development
(among other things)
About Me
• WordPress dev at WashU since December 2011
• “Professional code monkey, amateur grease monkey.”
• WordCamp STL organizer
• Luckiest WordPress dev in the world!
About Me
December 2011
• 0 WordPress sites
• 1,000s of SharePoint sites
(OK, maybe an exaggeration but who cares about SP)
• 3 Devs
July 2013
• 100s of WordPress Sites hosted locally
• 100s of WordPress Sites hosted on CampusPress
• 0 SharePoint sites
(OK, maybe an exaggeration but who cares about SP)
• >25 Devs, designers, content strategists, project managers, etc…
WordPress@WashU
In the beginning…we coded every site like it was the only site we
were doing, which meant:
• Blank Slate: we didn’t even use Bootstrap
• No Plugins: wrote all functionality
into the theme
• No Version control: ¯_(ツ)_/¯
• No Access: WP Easy Uploader FTW (?)
WordPress@WashU
Since then, we’ve gotten smarter:
• Unified theme: one theme for CP, Med School, and Main Campus
• SO Many plugins: 34 on medicine
(but only 17 on wustl.edu)
• SO Much version control: GitHub,
Bitbucket, BitBucket server
• No Access: Still no SFTP/SSH access,
but that’s OK
WordPress@WashU
While we may have a unified theme, there are still “one off”s that
we handle, plus child themes and legacy sites.
We have over 30 “in-house” plugins that are used on at least one
site.
Multiply X by Y and you just get a headache
Developing for WordPress@WashU
First attempt – let’s not talk about that
Second attempt – Symlinks to Symlinks in Symlinks (OK, maybe not THAT bad)
Third (and so far final) attempt – Multitennant!!!
Developing for WordPress@WashU
WPCampus 2016
Sarasota, FL
…my parent’s just moved to Bradenton…
…I can crash on their couch…
…If I only need to get the cost of the ticket approved…
…HOLY COW, I’M IN FLORIDA!!!
…but first a story
“ ‘..a software architecture in which a single instance of software
runs on a server and serves multiple tenants…’
-the Internet”
-Mike Corkum
Multitenant 101
Multitenant ≠ Multisite
• Per site wp-config file
• Multiple Databases vs
Single Database
• One set of core files,
independent uploads
(or entire wp-content folder)
Multitenant 101
N.B. I came up with the term “landlord” to describe the main set of
WordPress Core files
Multitenant 101
• April 2014 - WordPress 3.9 introduced symlinking for plugins
which was the final component needed for general use
• There were articles and “hacks” to do it before, but don’t be this
guy:
Multitenant 201
Or this
guy
Multitenant 201
WP Core files Database #2Database #1
Site #3Site #3Site #3
Symlink
wp-config DB
settings
Confused Yet?
Multitenant 201
(I apologize for our lack of hammocks)
Using VVV – create vvv-custom.yml and copy-and-paste this:
sites:
<your_site_name_here>:
repo: https://github.com/coderaaron/mtv-vvv-site.git
hosts:
- <your_site_domain_here>.dev
Multitenant How-to
But only one site isn’t that much fun, try this:
sites:
<site1_name_here>:
repo: https://github.com/coderaaron/mtv-vvv-site.git
hosts:
- <site1_domain_here>.dev
<site2_name_here>:
repo: https://github.com/coderaaron/mtv-vvv-site.git
hosts:
- <site2_domain_here>.dev
Multitenant How-to
sites:
<site1_name_here>:
repo: https://github.com/coderaaron/mtv-vvv-site.git
hosts:
-<site1_domain_here>.dev
<site2_name_here>:
repo:https://github.com/coderaaron/mtv-vvv-site.git
hosts:
-<site2_domain_here>.dev
…
<site99_name_here>:
repo: https://github.com/coderaaron/mtv-vvv-site.git
hosts:
-<site99_domain_here>.dev
Multitenant How-to
ALL DONE!
Multitenant How-to
• Checked to see if there is a landlord
– If not download WordPress Core
– Create a certificate to sign other certificates
• Create database
• Setup symlinks for mu-plugins, plugins, and themes
• Create a certificate and signs it using the landlord’s certificate
• Copies the modified wp-config.php and index.php
• Runs famous “5 Minute Install”
…but what’d that do?
That’s great but I use…
• Local
• DesktopServer
• Lando
• Docker
• Virtual machines
• Good ol’ fashion server
Multitenant How-to
Manual Multitenant how-to
• Install WordPress (no need to do 5 minute install, just need core
files)
– Change wp-config.php to
require$_SERVER['DOCUMENT_ROOT'].'/wp-config.php’;
Manual Multitenant how-to
• If you want to use WP-CLI add this to wp-config.php:
//require_once(ABSPATH. 'wp-settings.php’);
if( '<PATH_TO_LANDLORD>’ == $_SERVER['DOCUMENT_ROOT']) {
$_SERVER['DOCUMENT_ROOT']= getcwd();
}
• Replace <PATH_TO_LANDLORD> with the absolute path to you core files
(i.e. /var/www/wp_core)
Manual Multitenant how-to
• Create a folder (that your server can access) for your uploads
• Inside folder you just created
– Create wp-content folder and uploads
– Create a symlink to folder containing core files (named wp)
Manual Multitenant how-to
• Copy index.php file from landlord
– Inside index.php change
require( dirname( __FILE__ ).'/wp-blog-header.php’ );
to
require( './wp/wp-blog-header.php' );
Manual Multitenant how-to
• Set up wp-config.php as normal (salts, wp_debug, etc)
– Add to wp-config.php:
define( 'WP_HOME', 'https://<YOUR_URL_HERE>’);
define( 'WP_SITEURL','https://<YOUR_URL_HERE>/wp’ );
define( 'WP_CONTENT_DIR',dirname( __FILE__ ) . '/wp-content’);
define( 'WP_CONTENT_URL','https://<YOUR_URL_HERE>/wp-content');
Manual Multitenant how-to
• If you want to use independent themes or plugins folder, create
them here
• If you want to use a unified themes or plugins folder, create
symlinks to their locations
Manual Multitenant how-to
THAT’S IT!!!
https://github.com/coderaaron/WPCampusDemo
Manual Multitenant how-to
• Questions?
• Thank you!
• github.com/coderaaron
• twitter.com/coderaaron
The End

Mais conteúdo relacionado

Mais procurados

Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017Amazon Web Services Korea
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdfMinhTrnNht7
 
Infrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and AnsibleInfrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and AnsibleDevOps Meetup Bern
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowAnton Babenko
 
GitOps - Operation By Pull Request
GitOps - Operation By Pull RequestGitOps - Operation By Pull Request
GitOps - Operation By Pull RequestKasper Nissen
 
Advanced Security With GeoServer
Advanced Security With GeoServerAdvanced Security With GeoServer
Advanced Security With GeoServerGeoSolutions
 
svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드Insub Lee
 
쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.
쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.
쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.Open Source Consulting
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Ji-Woong Choi
 
Git interview questions | Edureka
Git interview questions | EdurekaGit interview questions | Edureka
Git interview questions | EdurekaEdureka!
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)Diacode
 
왕초보를 위한 도커 사용법
왕초보를 위한 도커 사용법왕초보를 위한 도커 사용법
왕초보를 위한 도커 사용법GeunCheolYeom
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform TrainingYevgeniy Brikman
 
(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막
(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막
(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막Jay Park
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot IntroductionJeevesh Pandey
 

Mais procurados (20)

Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
 
Ansible
AnsibleAnsible
Ansible
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
 
Infrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and AnsibleInfrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and Ansible
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
 
GitOps - Operation By Pull Request
GitOps - Operation By Pull RequestGitOps - Operation By Pull Request
GitOps - Operation By Pull Request
 
Advanced Security With GeoServer
Advanced Security With GeoServerAdvanced Security With GeoServer
Advanced Security With GeoServer
 
svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드
 
Gitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCDGitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCD
 
쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.
쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.
쿠버네티스 기반 PaaS 솔루션 - Playce Kube를 소개합니다.
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Understanding Monorepos
Understanding MonoreposUnderstanding Monorepos
Understanding Monorepos
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드
 
Pave the Golden Path On Your Internal Platform
Pave the Golden Path On Your Internal PlatformPave the Golden Path On Your Internal Platform
Pave the Golden Path On Your Internal Platform
 
Git interview questions | Edureka
Git interview questions | EdurekaGit interview questions | Edureka
Git interview questions | Edureka
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
 
왕초보를 위한 도커 사용법
왕초보를 위한 도커 사용법왕초보를 위한 도커 사용법
왕초보를 위한 도커 사용법
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform Training
 
(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막
(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막
(알도개) GraalVM – 자바를 넘어선 새로운 시작의 서막
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 

Semelhante a Using multi-tenant WordPress to simplify development

Intro to advanced web development
Intro to advanced web developmentIntro to advanced web development
Intro to advanced web developmentStevie T
 
Midwest php 2013 deploying php on paas- why & how
Midwest php 2013   deploying php on paas- why & howMidwest php 2013   deploying php on paas- why & how
Midwest php 2013 deploying php on paas- why & howdotCloud
 
Up and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignUp and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignJudy Wilson
 
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote2015 WordCamp Maine Keynote
2015 WordCamp Maine KeynoteScott Taylor
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseScott Taylor
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depthSanjay Willie
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Save Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command LineSave Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command LineShawn Hooper
 
Deploying PHP on PaaS: Why and How?
Deploying PHP on PaaS: Why and How?Deploying PHP on PaaS: Why and How?
Deploying PHP on PaaS: Why and How?Docker, Inc.
 
WP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp MontrealWP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp MontrealShawn Hooper
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAlan Forbes
 
WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015Shawn Hooper
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityMichelle Davies (Hryvnak)
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and SecurityJoe Casabona
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate WorkshopThe Toolbox, Inc.
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsCameron Dutro
 

Semelhante a Using multi-tenant WordPress to simplify development (20)

Intro to advanced web development
Intro to advanced web developmentIntro to advanced web development
Intro to advanced web development
 
Midwest php 2013 deploying php on paas- why & how
Midwest php 2013   deploying php on paas- why & howMidwest php 2013   deploying php on paas- why & how
Midwest php 2013 deploying php on paas- why & how
 
Up and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignUp and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web Design
 
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depth
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Save Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command LineSave Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command Line
 
Deploying PHP on PaaS: Why and How?
Deploying PHP on PaaS: Why and How?Deploying PHP on PaaS: Why and How?
Deploying PHP on PaaS: Why and How?
 
Learning to code
Learning to codeLearning to code
Learning to code
 
WP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp MontrealWP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp Montreal
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
From Zero To WordPress
From Zero To WordPressFrom Zero To WordPress
From Zero To WordPress
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate Workshop
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails Apps
 
Big Websites
Big WebsitesBig Websites
Big Websites
 

Using multi-tenant WordPress to simplify development

  • 1. Using multi-tenant WordPress to simplify development (among other things)
  • 3. • WordPress dev at WashU since December 2011 • “Professional code monkey, amateur grease monkey.” • WordCamp STL organizer • Luckiest WordPress dev in the world! About Me
  • 4. December 2011 • 0 WordPress sites • 1,000s of SharePoint sites (OK, maybe an exaggeration but who cares about SP) • 3 Devs July 2013 • 100s of WordPress Sites hosted locally • 100s of WordPress Sites hosted on CampusPress • 0 SharePoint sites (OK, maybe an exaggeration but who cares about SP) • >25 Devs, designers, content strategists, project managers, etc… WordPress@WashU
  • 5. In the beginning…we coded every site like it was the only site we were doing, which meant: • Blank Slate: we didn’t even use Bootstrap • No Plugins: wrote all functionality into the theme • No Version control: ¯_(ツ)_/¯ • No Access: WP Easy Uploader FTW (?) WordPress@WashU
  • 6. Since then, we’ve gotten smarter: • Unified theme: one theme for CP, Med School, and Main Campus • SO Many plugins: 34 on medicine (but only 17 on wustl.edu) • SO Much version control: GitHub, Bitbucket, BitBucket server • No Access: Still no SFTP/SSH access, but that’s OK WordPress@WashU
  • 7. While we may have a unified theme, there are still “one off”s that we handle, plus child themes and legacy sites. We have over 30 “in-house” plugins that are used on at least one site. Multiply X by Y and you just get a headache Developing for WordPress@WashU
  • 8. First attempt – let’s not talk about that Second attempt – Symlinks to Symlinks in Symlinks (OK, maybe not THAT bad) Third (and so far final) attempt – Multitennant!!! Developing for WordPress@WashU
  • 9. WPCampus 2016 Sarasota, FL …my parent’s just moved to Bradenton… …I can crash on their couch… …If I only need to get the cost of the ticket approved… …HOLY COW, I’M IN FLORIDA!!! …but first a story
  • 10. “ ‘..a software architecture in which a single instance of software runs on a server and serves multiple tenants…’ -the Internet” -Mike Corkum Multitenant 101
  • 11. Multitenant ≠ Multisite • Per site wp-config file • Multiple Databases vs Single Database • One set of core files, independent uploads (or entire wp-content folder) Multitenant 101
  • 12. N.B. I came up with the term “landlord” to describe the main set of WordPress Core files Multitenant 101
  • 13. • April 2014 - WordPress 3.9 introduced symlinking for plugins which was the final component needed for general use • There were articles and “hacks” to do it before, but don’t be this guy: Multitenant 201 Or this guy
  • 14. Multitenant 201 WP Core files Database #2Database #1 Site #3Site #3Site #3 Symlink wp-config DB settings
  • 15. Confused Yet? Multitenant 201 (I apologize for our lack of hammocks)
  • 16. Using VVV – create vvv-custom.yml and copy-and-paste this: sites: <your_site_name_here>: repo: https://github.com/coderaaron/mtv-vvv-site.git hosts: - <your_site_domain_here>.dev Multitenant How-to
  • 17. But only one site isn’t that much fun, try this: sites: <site1_name_here>: repo: https://github.com/coderaaron/mtv-vvv-site.git hosts: - <site1_domain_here>.dev <site2_name_here>: repo: https://github.com/coderaaron/mtv-vvv-site.git hosts: - <site2_domain_here>.dev Multitenant How-to
  • 20. • Checked to see if there is a landlord – If not download WordPress Core – Create a certificate to sign other certificates • Create database • Setup symlinks for mu-plugins, plugins, and themes • Create a certificate and signs it using the landlord’s certificate • Copies the modified wp-config.php and index.php • Runs famous “5 Minute Install” …but what’d that do?
  • 21. That’s great but I use… • Local • DesktopServer • Lando • Docker • Virtual machines • Good ol’ fashion server Multitenant How-to
  • 23. • Install WordPress (no need to do 5 minute install, just need core files) – Change wp-config.php to require$_SERVER['DOCUMENT_ROOT'].'/wp-config.php’; Manual Multitenant how-to
  • 24. • If you want to use WP-CLI add this to wp-config.php: //require_once(ABSPATH. 'wp-settings.php’); if( '<PATH_TO_LANDLORD>’ == $_SERVER['DOCUMENT_ROOT']) { $_SERVER['DOCUMENT_ROOT']= getcwd(); } • Replace <PATH_TO_LANDLORD> with the absolute path to you core files (i.e. /var/www/wp_core) Manual Multitenant how-to
  • 25. • Create a folder (that your server can access) for your uploads • Inside folder you just created – Create wp-content folder and uploads – Create a symlink to folder containing core files (named wp) Manual Multitenant how-to
  • 26. • Copy index.php file from landlord – Inside index.php change require( dirname( __FILE__ ).'/wp-blog-header.php’ ); to require( './wp/wp-blog-header.php' ); Manual Multitenant how-to
  • 27. • Set up wp-config.php as normal (salts, wp_debug, etc) – Add to wp-config.php: define( 'WP_HOME', 'https://<YOUR_URL_HERE>’); define( 'WP_SITEURL','https://<YOUR_URL_HERE>/wp’ ); define( 'WP_CONTENT_DIR',dirname( __FILE__ ) . '/wp-content’); define( 'WP_CONTENT_URL','https://<YOUR_URL_HERE>/wp-content'); Manual Multitenant how-to
  • 28. • If you want to use independent themes or plugins folder, create them here • If you want to use a unified themes or plugins folder, create symlinks to their locations Manual Multitenant how-to
  • 30. • Questions? • Thank you! • github.com/coderaaron • twitter.com/coderaaron The End