Fragmented Thought

Bulk Updating Magento Product Prices



Lance Gliser

Heads up! This content is more than six months old. Take some time to verify everything still works as expected.

In a some infuriating day, I have discovered there is one more step to changing a Magneto base url than most people list. It's a rare problem, and not one I expect most people will find.

The standard steps for changing magento's base url are:

  1. Update the core_config_data table. You'll need to change the web/unsecure/base_url and web/secure/base_url paths.
  2. Clear the system cache This could be in one of two places. If your directories are setup properly and can be written to by the web process, they are in httpdocs/var/cache, and httpdocs/var/session. If those directories are not writeable, they could appear in your server's root system at /tmp/Magento/var.

But, as I discovered today, there are two more pieces...

  1. Check for non-standard modification of the .htaccess file forcing domain redirection.
  2. Check if the magento configuration cache is using APC.

APC is the one stuck me. I spent about 5 hours trying like made to figure out where it kept getting the 'old' url from, when it didn't exist in the code or database anymore. In this rare occasion, we are hosting the development site, and the live site, on the same server.

Everytime the live site got a hit, it would cache the live configurations into the APC, and the dev would happily read right on, redirecting to the live site. Make sure you check /httpdocs/app/etc/config.xml and /httpdocs/app/etc/local.xml! This might be your issue!