2010 April

Magento Upgrade 1.3.x to 1.4.x Custom Theme Issues Fix

Posted by | Reference | No Comments

From reading through the blogosphere and all the varying Magento forums its obvious lots of people are having issues in upgrading from Magento 1.3.x to 1.4.x due to custom theme problems and errors. I was no different! Who would have thought these things could be so difficult!?

After several attempts at upgrading Magento to 1.4.x failing dismally I set about toying with a development site until I could figure out what was what?! Its detailed everywhere that your 1.3.x theme will have to be re-written to work with 1.4.x but I’ve managed to get a simple enough process working for me in upgrading Magento 1.3.x to 1.4.x and keeping my custom 1.3.x theme working in 1.4.x without any re-development at all! So here goes:

  1. Log into the Magento Backend Admin Panel and remove products that you have placed in more than one category. Just have your products in one category otherwise these cause errors after the upgrade.
  2. Turn off SEO url rewrites (System >> Configuration >> Web >> Search Engines Optimization)
  3. Turn off cache management (System >> Cache Management)

The following from CrucialWebHost’s help site is perfect:
A little cleanup first:

rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

Set the permissions on the pear file so we can run it:

chmod 550 pear
I then cleaned out the cache myself manually to be sure:
rm -Rf var/cache/*
and again from the CrucialWebHost:
Initialize the PEAR channel just in case:

./pear mage-setup .

And then we can upgrade:

./pear upgrade-all

If it tells you that there's Nothing to upgrade, you'll need to do this instead:

./pear install magento-core/Mage_All_Latest

Lastly, we need to clear out any temporary and cached data. These commands will be done via SSH in the staging directory.

rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
rm -rf var/cache/ var/session/ var/report/ media/tmp/

And then reset our file and directory permissions:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 pear

After this point delete everything in the following to clean out the backend cache (you need to do this or you will get errors when saving new configurations and probably logging into magento admin after upgrade too)
rm -Rf app/code/core/Zend/Cache/*
Log into your new 1.4.x Magento Backend Admin Panel from index.php/admin/

  1. ReIndex Data on everything (System >> Index Management)
  2. Turn on SEO rewrites  (System >> Configuration >> Web >> Search Engines Optimization)
  3. Turn on Cache Management (System >> Cache Management)

From this process you have theoretically upgraded your Magento installation to the latest 1.4.x version of Magento and have your custom theme working fine. Or at least I have, I can’t guarantee that this process will work for everyone out there?!

Good luck.