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 ? – Vaishal Patel Mar 29 '17 at 15:22
  • How can I check these? – Rafael Miller Mar 29 '17 at 15:24
  • Would you be using phpmyadmin ? – Vaishal Patel Mar 29 '17 at 15:24
  • No. Only ssh terminal – Rafael Miller Mar 29 '17 at 15:25
  • select * from core_config_data where path like "web/secure/use_in%" – Vaishal Patel Mar 29 '17 at 15:26
  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.

| improve this answer | |
  • nothing happens :( – Rafael Miller Mar 29 '17 at 17:48
  • I have just loaded your site and the page in question loads. – Vaishal Patel Mar 30 '17 at 7:37
  • I did a backup from other version and uploaded everything. The error was never solved :( but thanks a lot Vaishal Patel! – Rafael Miller Mar 30 '17 at 13:37
  • Rafael at least you are back up and running – Vaishal Patel Mar 30 '17 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 Mar 28 '18 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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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