VHOST deprecated notice, switching to SUBDOMAIN_INSTALL breaks sub-sites (4 posts)

  1. jdjenkins
    Posted 2 years ago #

    So I inherited a, let's say weathered, multisite installation. I've been updating and pruning dated plugins and what not, and upon turning on WP_DEBUG I see the following PHP notice:

    define() was called with an argument that is <strong>deprecated</strong> since version 3.0! The constant <code>VHOST</code> <strong>is deprecated</strong>. Use the boolean constant <code>SUBDOMAIN_INSTALL</code> in wp-config.php to enable a subdomain configuration. Use is_subdomain_install() to check whether a subdomain configuration is enabled

    As the error suggested, I switched to using define('SUBDOMAIN_INSTALL'), true;. While the main site seems to continue to function, all urls for sub-sites turn up broken. I understand it's just a notice and leaving it as VHOST doesn't really do any harm, BUT it wouldn't certainly feel great to be able to turn on debug and have (or at least very few) errors.

    Any ideas on what I'm doing wrong? Here's the multisite portion of my wp-config for reference:

    /* Multisite */
    define('DB_COLLATE', '');
    define('VHOST', 'no');
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'mysite.com' );
    define('PATH_CURRENT_SITE', '/' );
    define('BLOGID_CURRENT_SITE', '1' );
  2. Ipstenu (Mika Epstein)
    Posted 2 years ago #

    You may need to add more of the configs. Currently this is standard:

    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'mysite.com);
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
  3. jdjenkins
    Posted 2 years ago #

    Thanks ipstenu! Unfortunately, I've tried this variation (among other combinations of these settings). By including one or both of the first two lines (WP_ALLOW_MULTISITE and MULTISITE) I actually lose connection with the database for the entire install. "Error establishing database connection"

    I've run a number of multisite installations in the past, but never one with an issue of this sort.

  4. Ipstenu (Mika Epstein)
    Posted 2 years ago #

    Well... it's because yours is so old :(

    If it's working save for those deprecated warnings, I'd be inclined to let it go for now.

Topic Closed

This topic has been closed to new replies.

About this Topic