admin管理员组

文章数量:1404767

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I know that there is already a similar question like this. But I have already done all these suggested solution and nothing works for me.

  • If there are caching plugins installed like W3 total cache. Then purge cache first. Or may be disable them for time being

    • I have already disabled any possible plugin that using cache or redirection ]
  • Perform Search and Replace in the database for Old Site URL. You can Use this Plugin .

    • I opened sql file and perform search and replace for the live url into my local url ]
  • Reset Permalinks ( Dashboard >> Settings >> Permalinks ).

    • I used wp cli to perform permalinks reset ]
  • Last but not the least. Clear your browser Cache and History

    • Always clearing my browser and even using incognito ]

When I deleted all the existing tables, wordpress asking me to setup new wordpress but when I put the tables back, still redirecting me to the live site. Any suggestion?

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I know that there is already a similar question like this. But I have already done all these suggested solution and nothing works for me.

  • If there are caching plugins installed like W3 total cache. Then purge cache first. Or may be disable them for time being

    • I have already disabled any possible plugin that using cache or redirection ]
  • Perform Search and Replace in the database for Old Site URL. You can Use this Plugin .

    • I opened sql file and perform search and replace for the live url into my local url ]
  • Reset Permalinks ( Dashboard >> Settings >> Permalinks ).

    • I used wp cli to perform permalinks reset ]
  • Last but not the least. Clear your browser Cache and History

    • Always clearing my browser and even using incognito ]

When I deleted all the existing tables, wordpress asking me to setup new wordpress but when I put the tables back, still redirecting me to the live site. Any suggestion?

Share Improve this question asked Jan 10, 2020 at 11:57 bryanxkierbryanxkier 11 silver badge1 bronze badge
Add a comment  | 

3 Answers 3

Reset to default 1

Look in your wp_options database table for the siteurl and home options and check these are using your local URL.

As Captain S commented, these can also be overridden in your wp-config:

define('WP_HOME', 'http://www.localsite.test');
define('WP_SITEURL', 'http://www.localsite.test');

check your wp-config.php if you have defined 'WP_HOME' and/or 'WP_SITEURL'. Setting these values will override the wp_options table values. If that doesn't help I recommend the tool database search and replace.

Hope that helps.

Solved. Someone put a redirection code on the theme itself

本文标签: migrationWordPress localhost site always redirect to live site