admin管理员组

文章数量:1434954

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.

本文标签: domainWordpress keeps redirecting me to online site