skip to Main Content

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


  1. 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 with option_name equals to siteurl than change it to your local site URL (it’s often be http://localhost), make same changes to home 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:

    define( 'WP_HOME', 'http://localhost' );
    define( 'WP_SITEURL', 'http://localhost' );
    
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search