Bench Marking for Magento Reindexing

Hopefully this will help someone to figure out roughly how long your reindexing should take for your catalog on Magento:


Clearing All Product Data

If you have your test site setup and its time to make room for your real product catalog you can clear out all the product data using the following queries:

Please note, this does not reset the auto increment values on the tables, and don’t forget to update your table prefix (if you have one).

Import Issue – Dead Products

I really like Magento, and I like the import (even if it can be slow). If you put the right data in, it works well and its pretty good at checking your data before you import it… but I have recently discovered an issue which does not appear to be well documented so here I am documenting it.

It may seem obvious but if you assign custom attributes to a product say pack_size to a product which does not have that attribute in its assigned attribute set – it will kill the product edit screen for the product, to the point it will only load the left hand navigation and then it dies.It will also kill your product in the front end of the site.

So just be careful what you assign to your products!

Re-indexing through Shell when Magento doesn’t behave

Sometimes when you have a lot of data, Magento may not always successful index or a server error will leave on of the process set to “processing” in the index panel.

One solution is to run the indexer through shell with the following commands:


Clearing All Product Images

This is really quite simple:

Step 1: Flush the database using the following SQL:

Step 2: Remove all the product images from the /media/catalog/product/ directory

Step 3: Refresh your cache.

Is your Import/Export hanging with please wait?

We’ve been working with some large data sets and we noticed that once the number of product SKU’s reached a certain point although the import process was working (items appeared under manage products) the import itself would not complete with a success message.

One potential cause for this the script for monitoring the import progress is running out of memory due to the sheer number of items being imported. Increase your memory (we went for 2GB on our dedicated server) and you should find the import process completing with 100k+ rows in your csv.

Making a copy of your customer and order data for Magento 1.9.2

If you have setup a new Magento installation to match your live website and want to move accross the old orders and your customer data then follow the following steps.

I prefer to import my database tables via shell rather than using PHPMyAdmin as it has a tendency to hang if you have a lot of data

Exporting the Tables from your live database

To export the correct tables simply export any tables which begin with sales_ and customers_:

You will want to export them with the ‘Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement’ checked.

Once you have exported these files from PHPMyAdmin you will need to open up the files and add the following line to the beginning of the file:

And this line to the very end of the file:

This disables the foreign key checks for the duration of the import, it might not be recommended normally but as the target database is “empty” it fine to do.

Importing via Shell

Upload your sql file to your server and then navigate to it in your shell panel, once there run the following command (replacing the place holders with your settings):

you will then be prompted for the password, enter it and hit return and the file will be imported into the database. Just to ensure everything comes in smoothly I recommend clearing the cache and then log out of your target Magento store and log back in and you should find your dashboard is now up to date with your latest orders and customers.

Magento 1.9.2 Unknown cipher in list: TLSv1

If you have recently updated your Magento version to 1.9.2 and have then tried to install a new extension via the Magento Connect panel – you will have no doubt come accross the following error:

Unknown cipher in list: TLSv1

Suprised Magento broke something with an update, no me neither? When Magento includes a downloader that’s expecting SSL on a brand new version release when they’ve actually shut it off on the server. DOH!  The solution is as follows:

Locate the following file: downloader/lib/Mage/HTTP/Client/Curl.php, try changing:


Hope that helps somebody else!