Internal Server Error when accessing multisite Network Admin Page

Urgent issue which needs solving here. I've made the switch from subdomains to subdirectories for a website -- the Network Admin page could no longer be accessed afterwards, page displays an "Internal Server Error" message instead. Have tried reversing the changes, but the "Internal Server Error" message still persists, and network admin page can no longer be accessed.

wpconfig.php file (the relevant parts) as follows:
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'arccoffices.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__) . '/' );
/* Custom Settings */
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/wp-content' );
define( 'WP_CONTENT_URL', '/wp-content' );
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php' );
define( 'WP_MEMORY_LIMIT', '256M' );

And htaccess file as follows:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailng 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]

Please help me restore access to my network admin page, as I need this page to install plugins. Also, how do I properly enable subditectories for my page? Thank you so much for the assistance!

  • James Morris

    Hello Mel

    It looks like you're still using the .htaccess defines for subdomains. There's an ever so slight difference for subdirectories.

    Please backup your .htaccess and change it to the following IF you wish to use subdirectories:

    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]

    You'll also want to change the following in wp-config.php

    Change
    define('SUBDOMAIN_INSTALL', true);
    To
    define('SUBDOMAIN_INSTALL', false);

    Change

    /* That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH' ) )
    define('ABSPATH', dirname(__FILE__) . '/' );
    /* Custom Settings */
    define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/wp-content' );
    define( 'WP_CONTENT_URL', '/wp-content' );
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php' );
    define( 'WP_MEMORY_LIMIT', '256M' );

    To

    /* Custom Settings */
    define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/wp-content' );
    define( 'WP_CONTENT_URL', '/wp-content' );
    define( 'WP_MEMORY_LIMIT', '256M' );
    
    /* 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');

    Nothing should ever be custom defined below the line /* That's all, stop editing! Happy blogging. */ This will usually break an install.

    Let us know if this gets you going again.

    Best regards,

    James Morris

    • Mel

      Hello James,

      Still don't have access to my Network Admin page. Perhaps this might have something to do with it:

      Network Admin's dashboard is accessed from: arccoffices.com/wp-admin/network
      Whereas the Non-Admin dashboard is accessed from: arccoffices.com/arcc-core/wp-admin

      Trying to click on the network admin site from the Non-Admin dashboard will link to arccoffices.com/wp-admin/network, which results in the 500 internal server error.

      Network admin functions are accessible if I use: arccoffices.com/arcc-core/wp-admin/network, but adding plugin, creating sites (subdirectory format now) and other functions link back to arccoffices.com/wp-admin/.. , which makes this "hack" not really usable.

      As such, is there anything I can do to regain access to the actual Network Admin page at : arccoffices.com/wp-admin/network ? Like change the htaccess file or wp-config php. Thank you so much for the assistance!

      • James Morris

        Hello Mel

        I'm terribly sorry for the delay here.

        Yes, it sounds like there may be either an issue in the database or your wp-config.php that has the URL references incorrectly configured. We can look into this further and try to correct this for you. In order to do so, we're going to need access credentials for your site and hosting account so we can get into phpMyAdmin.

        NOTE: Please make a full backup of your site before sending the following information.

        Please visit the Contact page and complete the form with the following information:

        https://premium.wpmudev.org/contact/#i-have-a-different-question

        Option: I have a different Question

        Subject: "Attn: James Morris"

        In the Message box, please provide the following:

        - link back to this thread for reference
        - any other relevant urls

        - Admin login:
        Admin username
        Admin password
        Login url

        - Hosting Control Panel Login
        Admin username
        Admin password
        Login url

        Best regards,

        James Morris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.