I looked for a way to change from HTTP to HTTPS.

By mistake I switched my insecure and secure URL in config-web-secure/, and added the word magento to them both. As a result I get a 403 error on my admin panel and website. I tried changing the URL in the PHP but that didn't work.

  • did you find your solution ?? Commented Feb 24, 2017 at 12:08

2 Answers 2


I think you can set your sites secure and unsecure URLs from your database.

For that in your database make some changes in core_config_data table.

In table search "web/" from "search" tab in the header (using phpMyAdmin or similar). Edit web/unsecure/base_url and web/secure/base_url and
paste the URL of your site.

After that set value 0 to web/secure/use_in_frontend and web/secure/use_in_adminhtml.

I have attached a screenshot for better understanding


(click to enlarge)


You can do database changes on core_config_data table using magerun command line tool for Magento 1

and for Magento 2

After you have installed magerun, you should go to webroot and write the following command to get config from core_config_data table

 n98magerun.phar config:get web/ 

you can set your unsecure url:

n98magerun.phar config:set web/unsercure/base_url http://yourwebsite.com

And secure url :

n98magerun.phar config:set web/sercure/base_url http://yourwebsite.com

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