WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed wordpress guide to install multisite. My main site (mydomain.com) works well, my multisite is based on subdirectory i.e., (mydomain.com/test/), however it doesn't load at all (404 error). more details

 $ cat .htaccess

 RewriteEngine On
 RewriteBase /wordpress/
 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]

 $ cat wp-config.php

/* Multisite */
 define( 'WP_ALLOW_MULTISITE', true );

 define('MULTISITE', true);
 define('SUBDOMAIN_INSTALL', false);
 define('DOMAIN_CURRENT_SITE', 'mydomain.com');
 define('PATH_CURRENT_SITE', '/wordpress/');
 define('SITE_ID_CURRENT_SITE', 1);
 define('BLOG_ID_CURRENT_SITE', 1);

/* That's all, stop editing! Happy blogging. */

It will be great if you can help to fix it. thanks

share|improve this question
You turned Pretty Permalinks on, presumably? Are you able to view your server's log files (access and/or error logs) to see what request is actually being made on the server? – Pat J Jun 29 '14 at 16:36
Permalinks set to default, I just enabled log define('WP_DEBUG', true); on wp-config.php, but I can't see debug.log file under /wp-content/. – kuruvi Jun 29 '14 at 19:40
More details, I reinstalled. Previously I had subdirectory in the URL (I did set under setting/general), now everything is in my root folder. After the multisite installation, I'm facing new problem, i.e., the new site does open but without any styles (html inspector says it is looking for CSS under my domain.com/test/wp-includes.......). This is of course wrong!! I'm nginx web server. How do I fix this? – kuruvi Jun 29 '14 at 20:17
I don't believe Nginx uses .htaccess files, at least not out of the box. Googling 'convert .htaccess for nginx' may help you. – Pat J Jun 30 '14 at 0:55

I've faced the same error with both Nginx and Apache installed. Nginx works as a reverse proxy and serves static files. Because of this reason you have to insert the following code inside server directive:

if ( !-e $request_filename ) {
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;  
    rewrite ^(/[^/]+)?(/wp-.*) $2 last;                     
    rewrite ^(/[^/]+)?(/.*\.php) $2 last;                   

If you use Nginx as reverse proxy for static files you have to put the code listed above inside a location. i.e:

location ~ ^.+\.(jpg|jpeg|gif|png|webp|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|JPG|JPEG|GIF|PNG|ICO|CSS|ZIP|TGZ|GZ|RAR|BZ2|DOC|XLS|EXE|PDF|PPT|TXT|TAR|WAV|BMP|RTF|JS) {
if ( !-e $request_filename ) {
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    rewrite ^(/[^/]+)?(/wp-.*) $2 last;
    rewrite ^(/[^/]+)?(/.*\.php) $2 last;

If you run nginx + php-fpm (no Apache and further url rewriting with mod_rewrite involved) you have to put the code inside server directive.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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