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:

to

Hope that helps somebody else!