How to change backend URL?

backend-url
env.php

(Michael Jeppesen) #1

Question, if anyone is there. I edited my env.php file to change the name of my backend admin login url, and now no part of my site will load. I have the site installed on AWS Ubuntu. It was working fine until I changed the ‘frontName’ => ‘admin-z1274’ to ‘admin’. I forgot exactly what the original address was and now the site won’t load at all.

Any ideas?


app/etc/env.php — the place where Magento 2 stores the database credentials, backend URL, enabled cache types, etc
(Dmitry Fedyuk) #2

Delete cache.


(Muneeb Syed) #4

Try to change the backend URL of your Magento 2 store by running this command in the root directory:

php bin/magento setup:config:set --backend-frontname="newadmin"