最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

domain - Wordpress keeps redirecting me to online site

matteradmin6PV0评论
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 6 years ago.

Improve this question

I need to create a copy of a WordPress in a local environment.

I have alread done some research and

  1. Included the following line in wp-config.php (at it's start, also tried at the end)

    define('WP_SITEURL',''); define('WP_HOME','');

Note sure if these URLs should be different.

  1. Changed siteurl and home to in database in table [prefix]_options

  2. I have also checked the .htaccess file and it contain nothing that refers to the online domain.

but it keeps redirecting me to the online domain.

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 6 years ago.

Improve this question

I need to create a copy of a WordPress in a local environment.

I have alread done some research and

  1. Included the following line in wp-config.php (at it's start, also tried at the end)

    define('WP_SITEURL','http://mydomain.local'); define('WP_HOME','http://mydomain.local');

Note sure if these URLs should be different.

  1. Changed siteurl and home to http://mydomain.local in database in table [prefix]_options

  2. I have also checked the .htaccess file and it contain nothing that refers to the online domain.

but it keeps redirecting me to the online domain.

Share Improve this question edited Apr 8, 2019 at 15:44 TTT asked Apr 8, 2019 at 15:33 TTTTTT 3291 gold badge4 silver badges17 bronze badges 3
  • Do you have anything in your htaccess file (redirects) or any sort of redirect plugin? – Alexander Holsgrove Commented Apr 8, 2019 at 15:38
  • Good question, I had already checked .htaccess (but forgot it when writing my question), it has nothing that refers to the online domain), regarding plug-ins, I guess I need to ask this to the person who administrated the WP. – TTT Commented Apr 8, 2019 at 15:43
  • 2 Possible duplicate of WordPress localhost site redirect to live site – norman.lol Commented Apr 8, 2019 at 17:31
Add a comment  | 

1 Answer 1

Reset to default 0

Clear all rewrite_rules in the wp_options table in your database then open your local website in an incognito browser or clear your browser cache.

Post a comment

comment list (0)

  1. No comments so far