I'm new with magento. I'm accidentally changed Use Custom Admin URL value into Yes and added a custom admin url (which is doesn't exist). Now everytime i tried to access my magento admin it always redirect to that custom admin url and gives error because that URL doesn't exist. I have tried to return it to No and click save but i always get webadmin-sit-ecomm.tbsgroup.co.id’s server IP address could not be found.

enter image description here I have also tried to change it from the core_config_data table but still the same. All I need to do is return Use Custom Admin URL value to No. Can Anyone please help? enter image description here

  • GoTo Magento root directory and run bin/magento cache:flush. Then try again to access. Commented Jan 31, 2020 at 13:26

3 Answers 3


Magento will add more rows than we think. Try to delete custom admin rows and new custom url values. Remember to flush the Magento cache. Your admin will be back.

enter image description here

My Magento version is 2.3.1.

  • So it's okay to delete those rows?
    – Wira Xie
    Commented Feb 2, 2020 at 3:29
  • Backup your database first. And, delete these rows then. Commented Feb 2, 2020 at 3:30
  • I have deleted rows that contain admin url and flush magento cache but my admin page still redirect to the webpage that doesn't exists.
    – Wira Xie
    Commented Feb 3, 2020 at 2:26
  • Did you try to delete admin/url/custom, admin/url/use_custom, admin/url/use_custom_path? Commented Feb 3, 2020 at 2:42
  • yes, i deleted those rows.
    – Wira Xie
    Commented Feb 3, 2020 at 2:46

Try to add as custom url , the full admin url you want :

UPDATE core_config_data SET value = 'Enter you admin url here' WHERE path = 'admin/url/custom';


bin/magento cache:clean && bin/magento cache:flush
bin/magento indexer:reindex

Execute this command to revert to the default Admin URL


php bin/magento config:set admin/url/use_custom 0

** Execute this command to revert to the default Admin Path (set in the app/etc/env.php as described in the Method 2)

php bin/magento config:set admin/url/use_custom_path 0

Use one of the following methods to clear the Magento cache:

On the Admin sidebar, go to System > Tools > Cache Management. Then, click Flush Magento Cache. On the server, execute the following:

php bin/magento cache:flush

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.