Support » Plugins and Hacks » Including WordPress Core into another script

Including WordPress Core into another script

  • I am trying to include wordpress-ms core into another script using this:

    require_once( BX_DIRECTORY_PATH_ROOT . 'wordpress/wp-config.php');

    This worked perfect when WordPress was installed on the same database. But now I’m trying to separate them and when I try visit the site, it immediately ends the script an “Error establishing database connection” without loading anything.

    I print_r() the $GLOBALS for the scripts and it seems like they both share the same $GLOBALS[‘db’] array. I’m not sure if anyone has come across this situation before or has any ideas on how to get the wordpress core inside another script like this.

    Any suggestions would be greatly appreciated.

  • The topic ‘Including WordPress Core into another script’ is closed to new replies.