I activated multisite using subdirectories on my old WordPress site, and I created a new site (say my-example.com/new-site/).

I found links such as my-example.com/new-site/wp-content/mu-plugins/css/ can redirect to my-example.com/wp-content/mu-plugins/css/, however, my-example.com/new-site/wp-content/mu-plugins/css/style.css won't redirect and will throw out a 404 error, this leads to the site loading errors.

I was so confused, and tried hard refreshing sites, clearing cookies, but it didn't work.

The .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
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]

# END WordPress
  • "my-example.com/new-site/wp-content/mu-plugins/css/ can redirect to my-example.com/wp-content/mu-plugins/css/" - I'm not sure what you mean by that? There should be no "redirect" occurring here? – MrWhite May 8 at 10:53
  • 1
    @MrWhite According to rule RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L], the redirect will occur. – Guoyang Qin May 8 at 17:53

After trying a million of ways, I contacted the super admin and asked for permission to log into WP Engine, our host. I found there is a Multisite setting too. So I clicked "convert to multisite", and, bang! the error is resolved. Subsites can work properly now.

enter image description here

  • Thanks for the feedback. I wonder what that "magic switch" did? – MrWhite May 8 at 21:22
  • 1
    @MrWhite I guess it has something to do with the Nginx reverse proxy, which may override my .htaccess redirect for .css/.js static files and causes error for loading those files. Setting multisite on WP Engine may alter the setting of Nginx and make it work. – Guoyang Qin May 8 at 21:30

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.