How to recover a Magento site after loosing the encryption key - Ybus
6215
post-template-default,single,single-post,postid-6215,single-format-standard,ajax_fade,page_not_loaded,,side_area_uncovered_from_content,qode-child-theme-ver-1.0.0,qode-theme-ver-10.0,wpb-js-composer js-comp-ver-4.12,vc_responsive

How to recover a Magento site after loosing the encryption key

How to recover a Magento site after loosing the encryption key

fix_all_the_things_mage

Every time you finish installing Magento, it displays the encryption key. And are responsible to save it somewhere.

If you delete local.xml, the encryption key will be lost and you won’t be able to connect to the database again.

But there is a tedious way to fix it and get a new encryption key.

Export the database you are using, then you need to prepare a new installation of Magento, but don’t run it yet. Import the database that you just exported to a new database, create an user to access it (preferably the same one you already have) and run the installation again. This time, note down the encryption key.

Once this second site is up and running, export the database one more time. Import the database to the server of your 1st site, the one who is broken.

Go to app/etc/local.xml and edit the file to insert the new encryption key and to point to the new database.