0

So I installed a fresh 5.2 WP and set up the Multisite network working with subdomains, then created 2 new test sites.

From the outside all works great, I can browse the main site and the 2 test sites properly.

On the admin panel though, I can go and change the main site settings tab under network admin -> Sites and it saves properly.

When I try to do the same on any of the 2 test sites though I get a 403 forbidden error, the php script URL the form sends the into to is the same as the main site though (/wp-admin/network/site-settings.php?action=update-site) which has me puzzled as it should be working.

I've checked several guides on 403 errors and all checks are OK:

  • DB multisite tables are there
  • File permissions seems ok, I'm even trying with all 755 atm.
  • Config wise it's all WP default since it's a new installation
  • Created subdomain wildcard which path is set to the same as domain
  • I'm using the HTACCESS code from the network installation:
Options FollowSymlinks
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress
  • Added the network installation lines to wp-config.php as well:

    /* MULTISITE */ 
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'mydomain.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) )
        define( 'ABSPATH', dirname( __FILE__ ) . '/' );
    
    /** Sets up WordPress vars and included files. */
    require_once ABSPATH . 'wp-settings.php';`
    

Any idea what the problem could be?

  • So checking the server's log the petition was being blocked by ModSecurity because parameters contained a different subdomain. I eventually fixed it by disabling the firewall on the hosting. – Pdev Jul 10 at 11:06
0

I know this sounds ridiculous what I'm about to suggest but I've had a similar issue a number of times when running WordPress locally in Network mode.

Clear your entire cache (possibly more than once). This seems to be more problematic in Chrome than other browsers with my own experience.

Failing that, scrap your wildcard on the sub domain and set them up in either your host file (for local only) or with the correct DNS settings with your domain provider.

  • I'm actually working on a development server, but will try different browsers and clearing cache, and will try generating domains individually if that's what you meant, instead of the wildcard, it's weird because it does work and I can browse all sites, thanks! – Pdev Jul 10 at 8:07

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.