Cannot pinpoint what is causing a redirect
-
I am trying to create a separate tool, that will load WP, so I can run a one time export of some data. I’ve begun the script with simply:
define('WP_USE_THEMES', false); require(__DIR__ .'/wp-blog-header.php');
When I run it, I get redirected back to the home page of the site.
I’ve followed the code to try to determine the root cause, but I can only get so far..
I get to wp-includes/class-wp.php line 726
It reads:
do_action_ref_array( 'wp', array( &$this ) );
If I halt just before this, I do not redirect. If I halt after, it never gets that far, and redirects to the home page instead.
I am then lost as to what this function does, or how to properly follow after that.
I’ve tested with all plugins disabled, with a different theme, and with all mu-plugins removed. Still I get the redirect.
I’m at a loss. I’d be pulling my hair out, if I hadn’t already shaved it off.
Any assistance or ideas are welcome.
Thank you!
- The topic ‘Cannot pinpoint what is causing a redirect’ is closed to new replies.