WordPress still redirects after updating siteurl and home options


I’m trying to set up my WordPress site on localhost. For other sites it’s always worked when I’ve set the siteurl and home values in the wp_options table to the local URL (e.g. http://localhost).

However for one particular site I cannot get it to work. It always redirects to the live site. I’ve checked without cache using Private browsing or different browsers. I’ve searched through the options table and the only references to the live site domain are for various images (i.e. example.com/wp-content/...)

I’ve tried digging through the code and the redirect happens inside this do_action line:

# file wp-includes/template-loader.php
if ( wp_using_themes() ) {
     * Fires before determining which template to load.
     * @since 1.5.0
    # get to here ok
    do_action( 'template_redirect' );
    # don't get to here

That seems to go to wp-includes/plugin.php but I’m unable to figure anything else out from there. How do I get it to stop redirecting?

, DisgruntledGoat 3 years 2020-06-08T09:10:23-05:00 0 Answers 84 views 0

Leave an answer