How to change backend URL?

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?

Delete cache.

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"