before_wp_load(); // Load wp-config.php code, in the global scope eval( WP_CLI::get_runner()->get_wp_config_code() ); $obLevel = ob_get_level(); ob_start(); // Load Core, mu-plugins, plugins, themes etc. require WP_CLI_ROOT . '/php/wp-settings-cli.php'; while ($obLevel < ob_get_level()) { ob_end_clean(); } // Fix memory limit. See http://core.trac.wordpress.org/ticket/14889 @ini_set( 'memory_limit', -1 ); // Load all the admin APIs, for convenience require ABSPATH . 'wp-admin/includes/admin.php'; WP_CLI::get_runner()->after_wp_load();