Reset “Use Secure in Front End or Admin” in Database – Magento

October 8th, 2011 Posted by Public 10 comments on “Reset “Use Secure in Front End or Admin” in Database – Magento”

I ran into an issue this week where I switched on SSL on a development site and then realized the SSL cert was not installed correctly. This is a big issue in Magento because there is no way to get back to the admin to switch it back off.

If this ever happens do the following to switch back:

1. Open up your admin panel (cPanel or other)
2. Go to phpMyAdmin (if MySql)
3. Find your Magento Database
4. Find table “core_config_data”
5. Look for the columns “web/secure/use_in_frontend” and “web/secure/use_in_adminhtml”
6. Edit both values, make them equal to “0”

After this is done you will be back in action.

Tags: , ,
  • Ola Halvorsen

    Life saver!!

    • ash

      it works for me….
      Cheers…!!!

  • http://twitter.com/MmmSpeciosa Mmm, Speciosa!

    hmm, this didn’t work for me in my 1.6.2.0 install.  I migrated my production setup to my local, and the frontend loads up correctly, but http://www.localhost.com/admin/ keeps redirecting to https.  I found the two tables in mage_core_config_data (web/secure/use_in_frontend/adminhtml) and set them both to 0, but it is still doing it.  Any idea?

    • http://twitter.com/MmmSpeciosa Mmm, Speciosa!

       Figured it out .. silly me..  found this additional step in the magento wiki:
      “3. Clear /var/cache, /var/session and after you’ve done the above and regained access your system, reindex your URL_rewrite index
      after changing settings. This is necessary because your config is
      cached and clearing it forces a reread of the configuration data from
      the core_config_data table.”

      • akira

        You save my life

      • Rao Abid

        So nice ! I followed the above steps, and then read your comment.
        Without your comment, i was disappointed.

        thankyou

        +1 for the Author as well.

  • Pat

    You are the man!!! thanks for sharing, I was looking for this.

    • Pat

      Really helps me out.

      Best

  • Chanel

    Thank you very much! Helped us out as well

  • Rao Abid

    Thankyou So much, I gained access to my site again with your help.

    Appreciate.

    For someone to about how to find these columns:

    Please run this SQL in your phpMyAdmin:

    First Query to find “web/secure/use_in_frontend”:

    /* Start of SQL Query */
    SELECT *
    FROM `core_config_data`
    WHERE path LIKE ‘web/secure/use_in_frontend’;
    /* End of SQL Query */

    in the results, Change Value “1” to “0”.

    Second Query to find “web/secure/use_in_adminhtml”:

    /* Start of SQL Query */
    SELECT *
    FROM `core_config_data`
    WHERE path LIKE ‘web/secure/use_in_adminhtml’;
    /* End of SQL Query */

    in the results, Change Value “1” to “0”.

    and you are done with Database, then follow the step offered below by “Mmm, Speciosa! ”
    as:

    “3. Clear /var/cache, /var/session and after you’ve done the above and regained access your system, reindex your URL_rewrite index
    after changing settings. This is necessary because your config is
    cached and clearing it forces a reread of the configuration data from
    the core_config_data table.”

    Thats all.