OK here’s a quick simple fix for a magento problem that was doing my head in for a few days.
Recently i had the pleasure of upgrading a clients magento to version220.127.116.11 from the 1.5.x.x chain, long story short I had a range of problems which Ive progressively fixed over the last few days, you can read some of the problems on the past posts.
One of the major problems was, Magento would take a long time to save a product change this was a major delay in productivity for the customer; often it took 30 seconds – 1 min for a change to fully complete saving.
I tried a range of fixes online – non helped and i didn’t really want to do the whole fresh DB import products.
Finally i gave the magento database repairer a try, and it worked. Seriously magento is now operating like it was a fresh install.
I monitored what it was doing via “mytop” and i could see it was adding a lot of indexes and changing various properties on the database. (yay performance)
Here’s what you need to do to repair the magento database and speed magento back up.
Sourced from Magento Wiki:
- Download Magento database repair tool archive from the download page
- Uncompress the archive
- Put the magento-db-repair-tool-1.0.php into any folder on your server
- Backup your existing database to have ability to restore it if anything goes wrong
- Clone it as new database on the same server. Let’s call it “database2”
- Create an empty database (”database3”)
- Either copy your entire Magento folder (without cache and sessions) into a new one and install there into “database3” (By editing local.xml with credentials for the newly created “database3”);
- Or if you already restricted access to your Magento instance, you may just change your database credentials into “database3”, clean cache and launch Magento once: it will be installed automatically.
At this point you should have the clone of your original database in “database2” and a brand new “database3” with empty Magento installed.
- Now run http://url-of-your-server/path-to-folder/magento-db-repair-tool-1.0.php
- Enter access credentials to “database2” as “corrupted” database and to “database3” as “reference” database
- Set table prefixes, if applicable
- Press “Continue” and you will see result screen where you will see what was done to the “corrupted” database.
If you are satisfied with database repair report and need to fix your live database, you can either switch your installation to the “database2” (because it was repaired), or perform the repair directly on the live database.
Don’t forget to remove the magento-db-repair-tool-1.0.php and restore access to website when you are done.