Magento Upgrade to

The following post are simple notes I took during the process of upgrading Magento from version to Please feel free to send in a comment if you have any questions. It’s been a while, but if I can be of help, I’ll definitely reply.

Magento Open Source eCommerce

I started with to and with this being a Magento upgrade, I of course had problems. I then tried to and had the same problems. So most of the documentation here will be for a to upgrade path.

Things to do:

  • I might want to run the database repair/compare tool in Development.
  • Also, will want to finish up testing the upgrade so I know all the table ALTERs I’ll need to do. Maybe the work in step one above will help?

The idea below is that some of these tables so far that had been having problems updating/upgrading seem to be “index” tables. So, what I can do is completely drop these tables and then rebuild using the table schema of version

This is my process:

1. block website
2. follow prep from Upgrade Procedure
3. run update script
4. update local.xml

        <![CDATA[SET NAMES utf8]]>
        cp local.xml public/app/etc/local.xml
        sudo chown apache:apache public/app/etc/local.xml

5. php -f public/shell/log.php clean (this helps me get smaller tables to work with during the upgrade)
6. Fix error: Column “date” does not exists on table “catalog_product_index_website”

This fix for the issue is here: (which reloading the entire table in step 7 above fixes)

There are a number of these issues with additional tables (oddly they are all tables that can be emptied). This is taken care of by dropping and recreating the tables (see: next step).

First skip the catalog_product_index_website table column name change (we’re doing this because we’ll be dropping and rebuilding the table)

vi public/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-
lines: 4169-4177

This is what we’re commenting out:

        'type'      =&gt; Varien_Db_Ddl_Table::TYPE_DATE,
        'comment'   =&gt; 'Website Date'

*Note: in the post below the author suggests commenting out many more of the upgrade that is causing error, in which some in the comments advised against since what you’re doing is actually skipping pretty important stuff. This is the only instance that I agree with and had went ahead and skipped as part of the upgrade procedure.

seen here:

7. update/alter the problem tables

DROP these tables in the new database. These are empty on a clean install. IMPORT them via phpMyAdmin. They'll fill when Indexes are rebuilt:
DROP TABLE `catalog_product_index_website`, `core_url_rewrite`, `report_viewed_product_index`;

You’ll first want to EMPTY the sale_flat_quote tables:

TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `sales_flat_quote_shipping_rate`;

Here’s some notes on the foreign key checks:

This helps avoid a pesky foreign key constraint error. Unfortunately this will destroy your Wishlist and old Cart data/stats (this is something I was personally willing to do).

** I was actually able to skip this next part:

DROP TABLE  `sales_flat_quote`;

Now start recreating the tables we just dropped:


9. php public/shell/indexer.php reindexall (mentioned as import BEFORE instantiation:
10. instantiate the upgrade

This will inevitably fuckup and throw an error that you can see in var/reports/. Re-run the indexer and then reinstantiate:

php public/shell/indexer.php reindexall


11. return to Upgrade Procedure to cleanup:

In production I had a issue trying to “Reindex Data” getting an error message like:

  Product Flat Data Index process is working now. Please try run this process later.

The fix is to remove everything in /var/locks/


During the process I almost always end up at the point in which I’m instantiating the upgrade and then an error is thrown. These errors are usually unfollowable at first. Here is a list of ways I’ve gotten to move forward:

The last time this happened it failed on sales_flat_quote because I was unable to fully delete it before the instantiation.

  1. run the reindexall tool and then re-instantiate (it may eventually show you where it fails)

It’ll fuckup, so re-run the reindex tool the re-instantiated (after fixing sales_flat_quote), then you’re good.

Issues after the Upgrade:

Default Sort Order Newest

Default sort order was off. I wanted to atleast get it to go back to using the entity_id (last added product first). I used a comment from this StackExchange post:

So in the following file:

I essentially changed this:


To this:

$_productCollection=$this->getLoadedProductCollection()->clear()->addAttributeToSort( 'entity_id', 'DESC' )->load();

PayPal NVP API Errors

-rwxrwxrwx  1 apache apache 131460  Jul 23 17:34 exception.log
-rwxrwxrwx  1 apache apache   6258   Jul 23 16:44 googleshopping.log
-rwxrwxrwx  1 apache apache  20894  Jul 23 16:44 system.log

Seeing the following errors in /var/reports/exception.og

One thing I did was to update Configuration > SALES > PayPal > API/Integration Settings (select “Get Credentials from PayPal” and enter). I used [email protected] as the PayPal account to get the API information.

PayPal Guest Checkout Issue

PayPal Guest Checkouts are going out without an email address. Therefore, emails are being sent out as “Guest” and that’s in the To: field, so basically the To: field is filled with “Guest” and not an actual email.

Going into Sales > Orders, under Account Information shows no Email, however, under Payment Information it does log the PayPal Payer Email.

The 2 comments here are the fix:

Editing the PayPal Guest Checkout Confirmation Page:

This is the confirmation page after I used PayPal to pay:

What we want to do is tell people to do 2 things:

  • select Shipping Method
  • confirm Shipping Information (sometimes PayPal’s address isn’t where you want the package sent)
  • place order

Custom Option Is Not Displaying At Admin Orders

I ended up rebuilding 2 reporting tables (after clearing).

I started to thing that I might want to clear my log tables:

Magento Clearable Tables:

From Post:


Upgrade Resources:

Here’s some tools:

Here’s the resources I was looking at:

Similar issues with upgrade:

This guy had the same error with core_url_rewrites:

Here are some notes, POST upgrade:

Issue with Magento admin menu freezing up. Basically, it’s when the main menu in the Magento admin doesn’t drop down and all you can click is the Dashboard button. This is caused by permissions issues with the /js directory in the /media directory. The /media directory should be checked for permissions to match the original in this case. You can get away with just making owned by apache:apache in a pinch.

I noticed something about the Magento log files being 7 hours ahead. Apparently for things like cron and log files Magento overrides the server timezone:

Post written by Ed Reckers

Founder and lead web development consultant at Red Bridge Internet : San Francisco WordPress Developers and Consultants.

Leave a Reply