Downloader Upgrades Wrong Store
This is an old revision of the document!
The first time you use Magento Connect to install an extension or upgrade your store, a number of files are created in the downloader directory.
In these files, Magento writes the absolute path to where it’s installed so the downloader knows where to look to upgrade or install an extension.
Newer versions of Magento switched from using absolute paths to relative paths, but it is a good idea to check and make sure these files aren’t using absolute paths so you don’t accidentally upgrade the wrong store.
Below are all of the files that Magento writes path data to:
downloader/pearlib/pear.ini downloader/pearlib/peardev downloader/pearlib/php/peclcmd.php downloader/pearlib/php/pearcmd.php downloader/pearlib/pear downloader/pearlib/pecl downloader/pearlib/php/.registry/*
If you open up any of these files and see absolute paths, e.g.:
...compared to a relative path:
...then you must either edit these files and update the paths, or replace the downloader directory completely with a fresh one.
The easiest and safest thing to do, would be to delete the entire downloader directory and replace it with a clean directory from a fresh download (same version as you’re running).
Check and see what version you’re running by logging in to the admin of Magento and look in the footer. When you find out what version you have, go ahead and download it:
Replace the X.X.X with the version you want to download. So if you want to download Magento 1.1.8, you would get the following file:
Delete or rename your existing downloader directory, extract the data from the ZIP file you just downloaded, and move the downloader directory from that to where you have Magento installed.
After you’ve done this, you’ll likely have to re-install the extensions instead of upgrading them, as I don’t believe they’ll be listed in Magento Connect anymore. To do this, go to Magento Connect and install the following extension key:
You can also do this via SSH:
- ./pear mage-setup .
- ./pear install -f magento-core/Mage_All_Latest