Ok, I have had this problem before and was able to fix it but now nothing is working for me for some reason.

I changed the web/secure/use_in_adminhtml value from 0 to 1 within the magento configuration the last time I was logged into the admin panel. I was doing this to test secure connection on my dev site.

Problem: Can't login to my admin account now. I keep getting the message "Invalid Form Key. Please refresh the page."

I have already tried:

1.)Update the core_config_data table and changed the value from 1 to 0 for path web/secure/use_in_adminhtml

2.) DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain' and
DELETE FROM core_config_data WHERE path='web/cookie/cookie_path'

3.) Deleted var/cache folder (There was nothing in the folder)

4.) There was no var/session folder to delete

5.) Checked my app/etc/local.xml files and added these 2 lines:



6.) Cleared Chrome's cookies and cache, tried different browsers.

7.) Even though I have set the value for "web/secure/use_in_adminhtml" to 0, it still goes to an https page when typing in my admin address. If I remove the "s" and leave it as http it directs back to the https address.

Any other things to try? I'm totally lost.

  • Update: I've been through 2 pages of Google results and no "Solutions" have worked for me. Any other ideas out there? Commented Apr 15, 2018 at 2:51

1 Answer 1


OK I figure it out myself. I removed all entries in core_config_data table. SELECt * from core_config_data WHERE path LIKE 'web/unsecure%'

I added the values below in to the core_config_data table. I am now able to login to my admin panel.

Added these values

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.