Local magento installation is redirecting me to our live test site rather than utilizing the local files. Index file is being read until Mage::run(), then the redirect occurs:
Mage::run($mageRunCode, $mageRunType);
Details:
I pulled down the Magento system files and database from our live test environment and set them up on my local machine’s Linux environment. Everything seems to have gone smoothly, except when navigating to my root directory in a browser I am redirected to our live test site (rather than seeing my local files).
My question is… What code in the source configuration or database table would house the information for this redirect? I cleared the Magento cache using a script I found on Stack from someone with the same issue:
require_once 'app/Mage.php';
$app = Mage::app();
echo "<pre>";
if($app != null) {
echo "The app was initialized.\n";
$cache = $app->getCache();
if($cache != null) {
echo "The cache is not empty. Clean it.\n";
$cache->clean();
}
}
The asker says it was a cache issue, but the above script did not resolve my issue. I assume there is a configuration/cache file that houses an installation’s “root” directory, and that it is still pointing to our live site. I grepped through several of the directories to no avail.
Any assistance with this (and any other issue you think I may stumble across in this process) would be greatly appreciated. Thanks!
You need to change the value in the core_config_data mysql table:
and do the same for web/secure/base_url. If you have several shops you should also filter on scope/scope_id.