Magento 1.3 to 1.5 upgrade notes

The upgrade to 1.5 has a number of “gotchas” so while I am debugging the process on the test / staging instance, here are a few notes.

Basic process

Empty some or all of the log tables as they are potentially huge and are not needed:

TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
TRUNCATE `log_visitor_online`;
TRUNCATE `report_viewed_product_index`;
TRUNCATE `report_compared_product_index;`
TRUNCATE `report_event`;
TRUNCATE `catalog_compare_item`;
TRUNCATE `index_event`;

Backup the 1.3 instance using Magento’s built in backup.

Edit the resulting .sql file and uncomment the FOREIGN_KEY controls at the top and bottom of the file:

SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;

If the domain or subdomain is changing, do a search & replace e.g. replace www.myshop.com with test5.myshop.com

Create the new database instance, and execute the SQL from the previous step. Make sure it doesn’t time out, last table created is normally “wishlist_item”

Yoast Metarobots breaks product maintenance in Magento 1.4+, so remove relevant fields:

DELETE FROM `core_resource` WHERE `core_resource`.`code` = 'metarobots_setup';
DELETE FROM `eav_attribute` WHERE `eav_attribute`.`attribute_code` = 'meta_robots';
update eav_entity_type set additional_attribute_table='catalog/eav_attribute',entity_attribute_collection='catalog/product_attribute_collection' where entity_type_id=4;

Now FTP the Magento downloader.php onto the target site, check file permissions and execute it with http://test5.myshop.com/downloader.php

Follow the setup process including specifying the correct database name, user and password.

Use the same encryption key from the original site – find it in /app/etc/local.xml

If there are problems with the setup not accepting the admin user / password combination, simply re-run the installer by pointing your web browser at http://test5.myshop.com

Remember that the original admin user already exists in the database export, so create a temporary one and delete it later.

Fixing problems

Can’t access the admin site, gives 404 error

The database import will have incorrectly sequenced the sites, so run the following:

SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
UPDATE core_website SET website_id="0" WHERE core_website.code="admin" LIMIT 1;
UPDATE core_store SET store_id="0" WHERE core_store.code="admin" LIMIT 1;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;

Admin site is “white” i.e. CSS not working and plain HTML is displayed

Delete contents of /var/cache/

“There are no products matching the selection” when browsing front end

Wrong customer group ID for users that are no logged in. Execute the following SQL:

SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
UPDATE `customer_group` SET `customer_group_id` = 0 WHERE `customer_group_code` LIKE 'NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;

No product images

Check correct permissions and then copy the images directory structure from the source site eg:

cp /httpdocs/media/catalog/* /subdomains/test5/httpdocs/media/catalog/

Now login to admin site and run a  re-index on everything, and update all of the caches.

Error File does not exist: … media/catalog/product/no_selection

Review the System Configuration and under Catalogue / Catalogue / Product Image Placeholders and add the missing placeholders. Add back in the watermarks too in General / Design / Product Image Watermarks.

Comments

Leave a Reply

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