Search code examples
wordpressmamp

Wordpress + MAMP: always redirected to live site


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?


Solution

  • If you go into your database (on MAMP) via phpmyadmin, and check the options table, make sure that the lines for siteurl and home are set to http://localhost/ and not the live site url.