Downloader Upgrades Wrong Store

Last modified by Crucial on Sat, February 7, 2009 17:21
Source|Old Revisions  |  Back To Group

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.:

/home/username/public_html/downloader/...

...compared to a relative path:

./downloader/...

...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:

http://www.magentocommerce.com/downloads/assets/X.X.X/magento-X.X.X.zip

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:

http://www.magentocommerce.com/downloads/assets/1.1.8/magento-1.1.8.zip

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:

magento-core/Mage_All_Latest

You can also do this via SSH:

  1. ./pear mage-setup .
  2. ./pear install -f magento-core/Mage_All_Latest



 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs