I changed the secure options on Configuration -> Web 'use secure in frontend' and 'use secure in adminhtml' to 'yes' but it was not configurated yet. I cannot access the admin pannel from a browser because it redirects automatically to a https.

I tried to change via database with the commands:

UPDATE core_config_data SET value=0 WHERE path='web/secure/use_in_frontend' OR path='web/secure/use_in_adminhtml' OR path='web/url/redirect_to_base';

And deleted the var/cache but nothing happens.


SELECT * FROMcore_config_dataWHERE path LIKE 'web/secure/use_in_frontend'; +-----------+---------+----------+----------------------------+-------+ | config_id | scope | scope_id | path | value | +-----------+---------+----------+----------------------------+-------+ | 327 | default | 0 | web/secure/use_in_frontend | 0 | +-----------+---------+----------+----------------------------+-------+ 1 row in set (0.00 sec)

SELECT * FROMcore_config_dataWHERE path LIKE 'web/secure/use_in_adminhtml'; +-----------+---------+----------+-----------------------------+-------+ | config_id | scope | scope_id | path | value | +-----------+---------+----------+-----------------------------+-------+ | 328 | default | 0 | web/secure/use_in_adminhtml | 0 | +-----------+---------+----------+-----------------------------+-------+ 1 row in set (0.00 sec)

But nothing had changed.


Some pages have a strange redirection pattern. For example: http://www.mywebstore.com/customer/account/login/ sends me back to http://www.mywebstore.com/.

But http://mywebstore.com/customer/account/login/goes to https://mywebstore.com/customer/account/login/ witch is a 'Not possible to access this webpage' page.

  • Might have multiple records in there ? Commented Mar 29, 2017 at 15:22
  • How can I check these? Commented Mar 29, 2017 at 15:24
  • Would you be using phpmyadmin ? Commented Mar 29, 2017 at 15:24
  • No. Only ssh terminal Commented Mar 29, 2017 at 15:25
  • select * from core_config_data where path like "web/secure/use_in%" Commented Mar 29, 2017 at 15:26

2 Answers 2

  1. Open your core_config_data table in phpMyAdmin.

  2. Find the row with the path web/secure/use_in_adminhtml and change its value field from 1 to 0 to enable accessing admin panel from unsecure http://www.yourwebsite.com/admin url

Changing web/secure/use_in_frontend toggles customer shopping cart security, 1=on and 0=off which probably isn't of importance as you're trying to regain administrative access

  1. Clear /var/cache, /var/session and after you've done the above and regained access your system, reindex yourURL_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. You should now be able to access your Magento Admin panel by standard unsecured web access **(**port 80, http)****.

NOTE: Be aware that accidentally entering your leading https:// instead of http:// on your unsecure_base_url before you have enabled TLS/SSL on your webserver will lock you out, so if the above doesn't get you in, look for rows with web/unsecure/base_url and check for the aforementioned misconfiguration


After doing all these things I still couldn't be able to access the admin pannel or any http page without redirecting to https page. So I did a backup from my database (via ssh) and from the folders and created another image from the website. When I moved everything from the old one to the new website, everything worked fine.

So... I really don't know what I did that really solved the problem, but I know one thing: Do regular backups.

  • nothing happens :( Commented Mar 29, 2017 at 17:48
  • I have just loaded your site and the page in question loads. Commented Mar 30, 2017 at 7:37
  • I did a backup from other version and uploaded everything. The error was never solved :( but thanks a lot Vaishal Patel! Commented Mar 30, 2017 at 13:37
  • Rafael at least you are back up and running Commented Mar 30, 2017 at 13:42
  • 1
    I have just do 2 and 3 steps an my admin is working in my magento 2.2.2 version.
    – P_U
    Commented Mar 28, 2018 at 9:23

You could try checking this SQL query:

select value from core_config_data WHERE path IN ('web/secure/base_url', 'web/unsecure/base_url', 'web/unsecure/base_link_url', 'web/secure/base_link_url');

And see if there is any url with https, it helped me to fix similar issue

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.