I made a mistake. I changed the Admin Base URL and now I can't access the admin site.

In the core_config_data table,I edited the following rows in the database:

Scope:"Default" and Path:"admin/url/custom"

Select the NULL checkbox and save.

Scope:"Default" and Path:"admin/url/use_custom"

Change value from 1 to 0 and save.

I deleted the following rows:

Scope:"Stores" and Path:"web/secure/base_url" Scope:"Stores" and Path:"web/unsecure/base_url"

enter image description here

1 Answer 1


You need to insert again "web/secure/base_url" and "web/unsecure/base_url", it's your store frontend URL (not admin).

Don't forget to clear your cache from command line:

php bin/magento cache:clean php bin/magento cache:flush

  • Ok. but I can still the store with no problem. The admin though. Localhost isn't working.
    – Dean
    Commented Feb 13, 2017 at 7:38
  • Can you run this SQL command and show the results please: SELECT * FROM core_config_data WHERE path LIKE '%base%url%'; Commented Feb 13, 2017 at 7:41
  • I post the screenshot of the result.
    – Dean
    Commented Feb 13, 2017 at 7:55
  • Perfect! You welcome! Commented Feb 13, 2017 at 8:25

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.