Magento – Magento on localhost forwarding to live site

databaselocalhostmagento-1.9

I have installed Magento using MAMP for access on a localhost (as to not touch the live site).

I have then imported the database to duplicate the live site and have changed the username/password etc in local.xml.

The problem I have is that every time I try and visit my local site it redirects me to the live site.

I have gone into my /private/etc/hosts through Terminal and have added the line: 127.0.0.1 http://localhost/magento but I still can't get it to work.

Every time I visit http://localhost:8888/magento/index.php it forwards to the live site.

Does anyone have any ideas??

Best Answer

Check the table 'core_config_data' and seach for paths 'web/secure/base_url' and 'web/unsecure/base_url'. They should point to your local site.

Related Topic