Created: 2017.04.15
Add this block, replacing NETWORK_DOMAIN.FOO
:
define( 'WP_ALLOW_MULTISITE', true );
/* That's all, stop editing! Happy blogging. */
WP Admin > Tools > Network Setup > .. > Install
Choose the option to use sub-domains for your site addresses.
Ignore the warning that Wildcard DNS may not be configured correctly! – the DNS is correct.
You'll be asked to paste some more code to achieve this:
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'NETWORK_DOMAIN.FOO');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */
and this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
My Sites > Network Admin > Sites > Add New
Each host should point to the same network site folder
MAMP PRO > Hosts
These are installed into the regular location, but in network parent
These are installed into the regular location, but into the SITE_ID
subfolder. You can get the SITE_ID
by viewing the URL parameter after doing:
My Sites > Network Admin > Sites > Edit
From Moving WordPress: Moving a Site Into a Multisite Network
- Open up phpMyAdmin or SequelPro
- Browse to the orphan's database
- Structure
- Export everything except the two users tables (
wp_usermeta
andwp_users
) - Save to an
.sql
file
- Open the
.sql
file - Replace
domain.foo
withdomain.NETWORK_DOMAIN.foo
- Replace
`wp_
with the prefix[$table_prefix][SITE_ID]_
(the$table_prefix
is set inwp-config.php
) - Save
- Open up phpMyAdmin or SequelPro
- Browse to the network database
- Structure
- Select all tables with the prefix
[$table_prefix][SITE_ID]_
(the$table_prefix
is set inwp-config.php
) - With selected > Drop
- Open up phpMyAdmin or SequelPro
- Browse to the network database
- Import the
.sql
file
Users have to be manually recreated in WordPress and then assigned to any existing posts, pages and custom posts.
Where do Google Search Console verification files (eg google72281f176e3b2a1f.html
) go if there is only one root?