Search code examples
wordpress.htaccessmultisite

Wordpress Multisite with Subdirectories issue


I'm trying to set up a WordPress Multisite using subdirectories and I get a problem.

After I set up a Multisite in admin panel, following instructions, I edited two files on my server, 'wp-config.php' and '.htaccess'.

My .htaccess file looks like this:

# 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]
</IfModule>
# END WordPress

After that I updated page and here's how they look like:

Site Page

In console there's a whole bunch of "Failed to load resource" errors

Somehow it tries to load all the files from 'localhost' rather than from server. How can I fix this problem?


Solution

  • I resolved this issue by changing values in 'wp-options' table from 'localhost' to actual site domain.