Skip to content

Commit 503c90c

Browse files
committed
Try adding code blocks to readme.txt.
I forget how these work.
1 parent 24ad676 commit 503c90c

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

readme.txt

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,52 @@ You can activate it, but it won't do anything. You need to have the multisite fu
4444

4545
The WordPress support forums: https://wordpress.org/support/plugin/wp-multi-network/
4646

47-
= What's up with uploads? =
47+
= What about multisite constants? =
48+
49+
For maximum flexibility, use something like...
50+
51+
`
52+
// Multisite
53+
define( 'MULTISITE', true );
54+
define( 'SUBDOMAIN_INSTALL', false );
55+
define( 'PATH_CURRENT_SITE', '/' );
56+
define( 'DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST'] );
57+
58+
// Likely not needed anymore (your config may vary)
59+
//define( 'SITE_ID_CURRENT_SITE', 1 );
60+
//define( 'BLOG_ID_CURRENT_SITE', 1 );
61+
62+
// Uncomment and change to a URL to funnel no-site-found requests to
63+
//define( 'NOBLOGREDIRECT', '/404/' );
64+
65+
/**
66+
* These are purposely set for maximum compliance with multisite and
67+
* multinetwork. Your config may vary.
68+
*/
69+
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
70+
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
71+
`
72+
73+
= What about cookies? =
74+
75+
Use something like this to allow cookies to work across networks...
76+
77+
`
78+
// Cookies
79+
define( 'COOKIEHASH', md5( 'yourrootdomain.com' ) );
80+
define( 'COOKIE_DOMAIN', 'yourrootdomain.com' );
81+
define( 'ADMIN_COOKIE_PATH', '/' );
82+
define( 'COOKIEPATH', '/' );
83+
define( 'SITECOOKIEPATH', '/' );
84+
define( 'TEST_COOKIE', 'thing_test_cookie' );
85+
define( 'AUTH_COOKIE', 'thing_' . COOKIEHASH );
86+
define( 'USER_COOKIE', 'thing_user_' . COOKIEHASH );
87+
define( 'PASS_COOKIE', 'thing_pass_' . COOKIEHASH );
88+
define( 'SECURE_AUTH_COOKIE', 'thing_sec_' . COOKIEHASH );
89+
define( 'LOGGED_IN_COOKIE', 'thing_logged_in' . COOKIEHASH );
90+
`
91+
92+
= Uploads? =
4893

4994
As of version 3.5, new WordPress multisite installs use a more efficient way to serve uploaded files.
5095
Unfortunately, this doesn't play well with multiple networks (yet). Installs that upgraded from 3.4 or below are not affected.
@@ -66,6 +111,7 @@ Not much to talk about really. Check the code for details!
66111
== Changelog ==
67112

68113
= 2.2.0 =
114+
* WordPress 4.9 minimum version bump
69115
* Fix bug preventing sites from being moved
70116
* Tweak some CSS styling
71117
* Use more WordPress core functions for sites & networks

0 commit comments

Comments
 (0)