testing WordPress 3.5 multisite in its own directory

buffler Nov 29th, 2012 207 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - uploaded 3.4.2 files to, setup /wp/wp-config.php, visited to install
  2. - logged in, installed WordPress Beta Tester plugin, set to bleeding edge nightlies, updated
  3. - set 'site address' ('home' in db) to
  4. - copied index.php from /wp/ to root, added '/wp' to require path
  5. - verified site loading at
  6. - added define('WP_ALLOW_MULTISITE', true); to /wp/wp-config.php
  7. - deactivated WordPress Beta Tester plugin, visited Tools > Network Setup, chose sub-directories, clicked 'Install', was given the following:
  9.   1. Add the following to your wp-config.php file in /server-path-to-domain-root/wp/ above the line reading /* That’s all, stop editing! Happy blogging. */:
  11.   define('MULTISITE', true);
  12.   define('SUBDOMAIN_INSTALL', false);
  13.   define('DOMAIN_CURRENT_SITE', '');
  14.   define('PATH_CURRENT_SITE', '/');
  15.   define('SITE_ID_CURRENT_SITE', 1);
  16.   define('BLOG_ID_CURRENT_SITE', 1);
  18.   2. Add the following to your .htaccess file in /server-path-to-domain-root/wp/, replacing other WordPress rules:
  20.   RewriteEngine On
  21.   RewriteBase /
  22.   RewriteRule ^index\.php$ - [L]
  24.   # add a trailing slash to /wp-admin
  25.   RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  27.   RewriteCond %{REQUEST_FILENAME} -f [OR]
  28.   RewriteCond %{REQUEST_FILENAME} -d
  29.   RewriteRule ^ - [L]
  30.   RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wp/$2 [L]
  31.   RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
  32.   RewriteRule . index.php [L]
  34. - logged in. appears fine; I'm at
  35.   - all current site links include '/wp'; network links in admin bar omit '/wp', and, other than 'view network' (just, 404
  36.   - if I visit, url is rewritten to
  37.   - if I visit, I can access the network dashboard - but,
  38.     - all lefthand menu items link to /wp/wp-admin/network/* admin pages, but all admin bar links still omit '/wp' and 404
  39.     - if I visit 'Sites' (, 'Add new' link omits '/wp', and 404s
  40.     - if I visit 'Sites > Add New' (directly via the submenu), I'm at /wp/wp-admin/network/site-new.php and can enter new site settings, but the 'add site' form's action is for /wp-admin/network/site-new.php, and so it 404s on submission
  42. - deleted .htaccess in wp install dir (as there wasn't one, prior to network setup), put those rewrite rules in root-level .htaccess instead
  43.   - went to site admin; I'm at
  44.   - same as before, all current site links include '/wp'; network links in admin bar omit '/wp', but this time they are accessible.
  45.   - if I visit, it appears to work the same as - all links and forms on the various admin pages include '/wp' in their urls, but they work the same as they do when you're at /wp-admin/
  46.   - I can create new sites just fine.
  47.     - visiting the original site admin, urls are '/wp/wp-admin/...'; after creating a new site ('site1') and visiting admin, all urls are '/site1/wp-admin/...'
  48.     - all site frontends and admins load just fine, and everything appears to work correctly.
  50. * conclusion: rewrite rules are correct, but ought to be included in the root-level .htaccess file, not in the WordPress install directory (per this comment: )
RAW Paste Data