When I install a backup of my WordPress site on my local MAMP server, so i can work on it and test new features etc, and I visit ANY link or do anything (including logging in) it always throws me to the actual live website.
For example, if the local address for the site is “localhost/xyz” and I type that in, it takes me to it but anything after that throws me to the actual live site.
So on “localhost/xyz”, if I click on log-in or any page etc, I end up at http://www.xyz.com
This is being VERY problematic because I can’t test any page or work on any page locally.
How can i go about fixing this?
If you go into your database (on MAMP) via phpmyadmin, and check the options table, make sure that the lines for
siteurlandhomeare set tohttp://localhost/and not the live site url.