I changed the admin URL path and I need to change it back, but I no longer have access to the admin panel, because I changed the admin URL. :( I forget exactly what the input form looked like, so I'm not sure exactly what I did, but as soon as I hit "save" I lost my access to the admin panel. How can I get into the admin panel?

2 Answers 2


If you have acces to the server the following command should help you out:

bin/magento setup:config:set --backend-frontname <name>

You can view your current URI in:



  • I found that file in the code base. But, I don't see anything like the file path I used. I don't know what to change back?
    – kim
    Commented Jun 12, 2017 at 18:28
  • In the file you should find something in the lines of: 'backend' => array ( 'frontName' => 'admin', ),
    – zazoe
    Commented Jun 12, 2017 at 18:29
  • return array ( 'backend' => array ( 'frontName' => 'rtujrjyjuk', ) but, i'm not seeing the URL?
    – kim
    Commented Jun 12, 2017 at 18:31
  • Your admin URI would be: rtujrjyjuk
    – zazoe
    Commented Jun 12, 2017 at 18:32
  • yes. should I change rtujrjyjuk to admin?
    – kim
    Commented Jun 12, 2017 at 18:33

I have read above conversation, As you know to change in app/etc/env.php like below,

array (
    'frontName' => 'admin',

After changed admin name, you must delete all directories under \pub\static directory (don't delete .htaccess and deployed_version.txt file)

And run

bin/magento setup:static-content:deploy command

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.