My LocalWP staging website keeps redirecting me to the live web + cant even log into the wp admin.
This is a custom wordpress website. I’m using LocalWP, made a copy of the website using duplicator.
How could I fix this error? Has anyone had familiar issues?
Thank you
I browsed the files but couldnt really find anything that could help
2
Answers
There are at least two options:
The best way is to change site URL in database. Go to table
wp_options
and find a row withoption_name
equals tositeurl
than change it to your local site URL (it’s often behttp://localhost
), make same changes tohome
row.Else, if you can’t change the URL in the DB, there is an option to put the setting into config file, but be careful, if you upload the file to the live server, it will stop working. Put these two lines into your
wp-config.php
:WordPress database and update the wp_options table’s siteurl and home rows to your staging URL.
Verify that your wp-config.php file in the root directory of your WordPress installation doesn’t contain any hard-coded references to the live website’s URL.
Look for lines like define(‘WP_HOME’, ‘http://www.istacksolution.com’); or define(‘WP_SITEURL’, ‘http://www.istacksolution.com’); and update them with your staging URL.