Slide 1

Slide 1 text

Wordpress Multitenancy

Slide 2

Slide 2 text

Multitenancy?

Slide 3

Slide 3 text

wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php …

Slide 4

Slide 4 text

wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php …

Slide 5

Slide 5 text

_shared/ wp-admin/ wp-includes/ index.php wp-lo in.php wp-settin s.php wp-comments-post.php … site_a/ wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php …

Slide 6

Slide 6 text

_shared/ wp-admin/ wp-includes/ index.php wp-lo in.php wp-settin s.php wp-comments-post.php … site_a/ wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php … site_b/ wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php …

Slide 7

Slide 7 text

Slide 8

Slide 8 text

Slide 9

Slide 9 text

Slide 10

Slide 10 text

_shared/ wp-admin/ wp-includes/ wp-core-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php … site_a/ confi /wp-tenant-confi .php wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php …

Slide 11

Slide 11 text

# config/wp-tenant-config.php define('DB_NAME', 'foobar_wp'); define('DB_USER', 'username'); define('DB_PASSWORD', 'password'); define('DB_HOST', "lolcathost"); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); define('WP_CACHE', true); define('WPLANG', 'en'); define('WP_DEBUG', false); define('AUTH_KEY', '9999999'); ... blah blah $table_prefix = 'wp_';

Slide 12

Slide 12 text

# _shared/wp-core-config.php -> site_a/wp-config.php // require tenant file require_once($_SERVER["DOCUMENT_ROOT"] . "/config/wp-tenant- config.php"); define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content'); define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp- content'); if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); require_once(ABSPATH . 'wp-settings.php'); ?>

Slide 13

Slide 13 text

_shared/ wp-admin/ wp-includes/ index.php wp-core-confi .php wp-lo in.php wp-settin s.php wp-comments-post.php … site_a/ confi /wp-tenant-confi .php wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php … site_b/ confi /wp-tenant-confi .php wp-admin/ wp-includes/ wp-content/ wp-confi .php index.php wp-lo in.php wp-settin s.php wp-comments-post.php …

Slide 14

Slide 14 text

36 Wordpress Sites 1,010MB -> 67MB

Slide 15

Slide 15 text

We’re hirin ! http://jobs.forward.co.uk/vacancies/