Support » Networking WordPress » vary wpconfig from site to site

  • is it possible to have wp-config settings for specific sites? eg define( ‘JETPACK_DEV_DEBUG’, true ); for just one site not the entire network?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, by adding php code in wp-config.php. It can be done many ways. Here is some example code (disclaimer – I didnt test this code):

    
    # different configurations depending on hostname
    $servername = gethostbyaddr($_SERVER['SERVER_ADDR']);
    
    if (strcmp($servername,"site1.domain.com") == 0) {
        define( ‘JETPACK_DEV_DEBUG’, true );
    } else if (strcmp($servername,"site2.domain.com") == 0) {
        define( ‘JETPACK_DEV_DEBUG’, true);
    } else {
        # default setting
        define( ‘JETPACK_DEV_DEBUG’, false);
    }
    
    

    This causes no error but does nothing.

    ftm neither does the define( ‘JETPACK_DEV_DEBUG’, true); on its own. I’ll get back to jetpack to find out whats going on. imt develop without it I guess

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘vary wpconfig from site to site’ is closed to new replies.