Upgrading Magento via Magento Connect

If you are planning on upgrading Magento via Magneto Connect you will probably want to read this article to help uncover some of the issues and pitfalls you might come across.

Unfortunately, I have been using WordPress CMS a lot longer than I have been using Magento. I say “unfortunately” because I have got used to the easy upgrade-ability of WordPress where things seem to work 99% of the time and maybe not go as planned 1% of the time. Magento on the other hand is an entirely different animal. Try and install a simple extension or do an upgrade and it seems to go as planned 1% of the time and fail 99% of the time. Maybe it was just me, but I absolutely dreaded the inevitable upgrade of Magento from version 1.6 to 1.7.

Upgrade Magento to 1.7 (or to be exact).

Firstly, you should make a backup. You can download the entire website to your local machine using something like “FileZilla” and export the database using phpMyAdmin. Alternatively, you may be able to run a backup from your CPanel that backs up the entire home folder on your web server.

If Magento is installed in the root directory, browse to http://yourdomain.com/downloader/, else to the folder it resides in: http://yourdomain.com/magento/downloader/

Enter your username and password to log into the Magento Connect Manager.

In the “Paste extension key to install:” text box, type “magento-core/Mage_All_Latest” and click on “Install”. If that doesn’t work, type “connect20.magentocommerce.com/community/Mage_All_Latest” instead.

Invalid Post Data

If you get “Invalid Post Data” at this point, it is probably to do with your .htaccess file. Maybe you have added something to it? Try reverting to the original .htaccess supplied with the version of Magento you are upgrading from and see if this works OK. This post helped me narrow down the problem.

With this particular installation I needed to enter “connect20.magentocommerce.com/community/Mage_All_Latest” in the “Paste extension key to install:” text box. A list of extensions was then displayed that looks something like this:

Magento Extension DependenciesIf you are happy to go ahead with the upgrade, click on “Proceed”.

For quite a few minutes, the console screen can read “Please Wait… preparing for upgrades” and then it starts.

Magento Console - Please Wait

Connect Error: Package is Invalid

If you get lots of errors like this:

CONNECT ERRORPackage 'Mage_All_Latest' is invalid
 './pkginfo/Mage_All_Latest.txt' already exists
 Package 'Interface_Adminhtml_Default' is invalid
 './app/design/adminhtml/default/default/layout/admin.xml' already exists
 Package 'Interface_Frontend_Default' is invalid
 './app/design/frontend/default/default/etc/widget.xml' already exists
 Package 'Interface_Install_Default' is invalid
 './app/design/install/default/default/layout/main.xml' already exists
 Package 'Mage_Downloader' is invalid
 './downloader/js/prototype.js' already exists
 Package 'Mage_Centinel' is invalid

then you need to edit this file:


and comment out this part:

if (file_exists($dest)) {
   $this->addError("'{$file}' already exists");
   return false;

which is located right at the bottom of the file. You should then be able to run the installer again and it should work fine… or at least get past this error. If however, installation fails again, you will need to re-edit the file as it will be replaced by the version just downloaded.

Connect Error: Can’t Write to File

If you get:CONNECT ERROR: Cant write to file, fix any file and folder permissions issues you might have using magento-cleanup.php (see this guide for more information)

Upgrade Magento to 1.7 Complete

If everything seems to update successfully on the console, you should clear the contents of your cache and session directories. (You should delete everything in the /var/cache and /var/session directories).

Browse to your Magento home page.

500 Internal Server Error

If you get a 500 Internal Server Error, and you haven’t already run the Magento Cleanup script, it is most likely because of files or folders permissions. Run the script to see if that clears the problem.

Service Temporarily Unavailable

If you receive a “Service Temporarily Unavailable - The server is temporarily unable to service your request” error, it is probably due to your store still being in offline mode. Offline mode prevents visitors making changes to your store (through purchases etc) while you are performing your upgrade. To resolve this error, simply delete the “maintenance.flag” file that is located in the root directory of your Magento installation.

Triple Icons

A side effect of the upgrade seems to be that the buttons on the back-end of your store will have 3 icons instead of one. This is very easily fixed. Refresh your browser cache and reload the page and the buttons should revert back to normal.

Top Menu Disappeared

A final major issue I had with the upgrade was that my entire top menu disappeared from the front-end of the store. This one was a little trickier to work out what was going on. The solution was to:

– catalog.xml and page.xml
– base/default/layout
– default/mytheme/layout

This post helped a lot.

After clearing the Magento cache my top menu reappeared!


Hopefully at this point your store should be behaving properly and everything looking the way it should do. As usual, upgrading Magento via Magento Connect is not plain sailing but in this particular instance it seems you can overcome all the issues quite easily.

Leave a Reply

Your email address will not be published. Required fields are marked *