I have just set up a client live site to my development server and change the config live site URLs to my test server URL under core_config_data table i also have all the cache deleted but when i open my development server URL the site is keep going to live site i have tried opening the admin its going to live site too .htaccess has nothing in it for this redirection site using varnish cache.

Any one having any idea what i am missing.

  • Post your answer as an answer - not a comment. Then mark it as accepted. Commented May 1, 2013 at 16:59
  • @sonassi, posted but it is too simple to be truth, just to make sure we don't have a kiddish mistake here. Commented May 1, 2013 at 18:04
  • I do not think this is to localized - it's quite a common problem.
    – Alex
    Commented May 10, 2013 at 9:21

4 Answers 4


These are the three reasons I have seen a dev site redirect to production ...

  • Be sure to clear and flush your cache
  • Make sure your URLs are set in the admin for your development site
  • We dump our production db, use sed to replace the production urls with dev urls, then import the dump to a dev db
  • Make sure apache is listening for requests for your development urls
  • Add a fourth. Bad file/folder permissions cause Magento to write the cache files to system /tmp instead of var/tmp and var/cache. Commented May 11, 2013 at 0:02

I suppose you have different databases for both installations. Also check that app/etc/local.xml of each installation have correct (different, corresponding) credentials.


Is it on the same server?! If so, check apache configuration for your test url. Also you can restart varnish, sometimes cache cleaning does not work.

  • Hey.. thanks for your answer!! Actually i resolved the issue i had took abackup of the local.xml and deleted it upload it again.
    – Ravi Soni
    Commented May 1, 2013 at 4:59

In this case you have to flush magento cache

and if you are not able to access your magento then follow my below trick

1) If you have ssh access

Create a shell Script with below code named test.php in root shell folder

ini_set('display_errors', 1); 
require_once 'abstract.php';
class Mage_Shell_Test extends Mage_Shell_Abstract{
    public function run(){
       echo 'Done';
$shell = new Mage_Shell_Test();

After creating this file login your SSH and go to your magento root and fire below command

php shell/test.php 

2) If you dont have ssh access

Create a file in your magento root named test.php

with below code

ini_set('display_errors', 1); 
require_once 'app/Mage.php';

fire below URL in your browser http://yourBaseUrl/test.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.