I have just installed a live site onto a development domain. I changed the web/unsecure/base_url
and web/secure/base_url
fields in core_config_data but I accidentally misspelled the new domain. I then loaded the site and noticed my mistake. I've since corrected the spelling but it seems to have cached the wrong domain. I've tried re-importing the database and changing the urls, I've deleted everything in the cache directory but still the js and css files are using the wrong domain in every link in the admin back-end. And the admin back-end is pointing to the wrong domain too.
Any suggestions? It's an old Magento 1.3 install.
Best Answer
If you don't have proper permissions on the
var/
folders, Magento can write its cache information to the system/tmp
folder.This can lead to a situation where you've changed the base URLs in the Magento database, cleared cache (manual deletion of all mage-?? folders in
var/cache
), (cleared APC cache if you're running the op-code cache), (manually disabled the compiler (1.4.x.x and later)) and the system still looks for the original site.Most people who own their own server discover that the site magically starts working after fixing, clearing and resetting permissions and then rebooting the server. The server reboot clears
/tmp
of the Magento cache files and Magento finally starts looking at its own configuration to find where it's located.Screen shots of this in action...
The Magento directory found in
/tmp
...And the Cache living in that directory. Note the path ->
/tmp/magento/var/cache
For finding that misplaced cache directory, if you can install
n98-magerun
, use the commandn98-magerun.phar sys:info
to get a basic system info listing with one item beingCache Directory
location.