1

Based on advice I got from another question, I created a development copy of a multisite installation I've inherited inside of a Vagrant VM.

On a test site as described here...

enter image description here

I get an error

enter image description here

Could it be something in the .htaccess file?

RewriteEngine On


RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
  • 2
    Are you sure that htaccess files are allowed on your server? Check that first. The 404 is coming from your http server and not making it to WP. – user42826 Nov 18 '14 at 18:18
  • Hi @user42826, how's about you moving that down to the answer section so I can mark it correct? In other words, thank you!! – Rick Nov 18 '14 at 19:27
3

The 404 is coming from your http server and not making it to WP. htaccess is not configured on your server.

2

Assumption: you're running on an Apache web server. If not, you'll have to translate the relevant portions of this answer into the nginx or IIS or whatever server-ese.


Per the Codex page on setting up Multisite, you should have Pretty Permalinks enabled and working on your site prior to setting up Multisite. (See Step 1.) Pretty Permalinks require you to set up rewrite rules in a .htaccess file (or else in your server's config file).

Proper .htaccess files (as mentioned by @user42826 in his/her answer) depend on the version of WordPress you're starting from. Since the current version is 4.0, I'm going to assume that's what you're dealing with.

.htaccess file for WP Multisite > 3.5:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

If you're using a version older than 3.5 (and if you are, please upgrade), then check out this page for alternate .htacess rules.

Edit -- it looks like you've got the .htaccess rules for versions lower than 3.5 (ie, 3.4.2 or earlier). If you've upgraded your WordPress Multisite installation from 3.4.2 or earlier to 4.0, that should work. If you've been running WordPress single-site since before 3.4.2, you should read this:

You cannot choose Sub-directory Install (for a path-based network) if your existing WordPress installation has been set up for more than a month, due to issues with existing permalinks.

From the Restrictions section on the Before You Create a Network page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.