0

Is it possible to easily check with code if a site is running as multisite instance?

7
  • 2
    Possible duplicate of Programmatically get current multi-site instance name
    – leymannx
    Commented Oct 3, 2019 at 22:01
  • With the linked answer simply check if $site_name !== 'default'.
    – leymannx
    Commented Oct 3, 2019 at 22:02
  • Couldn't 'default' site be there along the other ones? Commented Oct 3, 2019 at 22:22
  • Actually I just accidentally found this: drupal.stackexchange.com/questions/123141/… which seems to be a proper duplicate. Commented Oct 3, 2019 at 22:34
  • Is a little bit unclear what you really need. So, you want to check if there are other instances then just "default", yeah then it seems to be a good idea to check the sites.php file or other directories within /sites.
    – leymannx
    Commented Oct 4, 2019 at 5:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.