Support » Localhost Installs » Localhost Redirects to Live Site

  • Singularitech

    (@singularitech)


    I am trying to install a locally hosted version of a live site.
    But now anytime I type in localhost/test_site in my browser it redirects me to the actual live site.

    Here is what I did so far:

    1) I have downloaded the files from the live site into a folder within the htdocs folder.
    2) I have downloaded a backup of mySQL database from my cPanel, created a database locally and imported the SQL file in it.
    3) I changed the DB_HOST line in the wp-config.php file to define(‘DB_HOST’ , ‘localhost’); and added define(‘WP_HOME’, ‘localhost’ ); and define(‘WP_SITEURL’, ‘localhost’);

    *At this point when I typed localhost/test_site I had a unable to connect to database error.

    4) I went in phpMyAdmin and changed the WP-OPTIONS WP_SITEURL and WP_HOME to http://localhost

    Now when I try to connect I get a redirect to the live version of the site.

    I looked at the .htacces file and there do not seem to be a redirect to the live site only things related to my shopping cart plugin.

    Anybody here has an idea whats missing or wrong?

    Thanks a bunch

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Localhost Redirects to Live Site’ is closed to new replies.