<?php //mimic the actuall admin-ajax define('DOING_AJAX', true); define('WP_DEBUG', false); //turn off debug if (!isset($_REQUEST['action'])) { die('-1'); } //make sure you update this line //to the relative location of the wp-load.php //require_once('../../../wp-load.php'); #$_SERVER['HTTP_HOST'] = 'yourdomain.com'; ini_set('display_errors', true); include 'classes/class-core.php'; HW_WP::load_wp(); function switch_to_blog_cache_clear($blog_id, $prev_blog_id = 0) { if ($blog_id === $prev_blog_id) { return; } wp_cache_delete('notoptions', 'options'); wp_cache_delete('alloptions', 'options'); } add_action('switch_blog', 'switch_to_blog_cache_clear', 10, 2); /** * END LOAD WORDPRESS */ #switch_to_blog( 31 ); #var_dump(get_bloginfo('name')); #restore_current_blog();