I want to change the admin URL by using custom admin URL and path
- Go to
Stores -> Configuration -> Advanced -> Admin -> Admin Base URL.
- Uncheck the "Use System value" for "Use Custom admin path".
- Select "Yes" in "Use Custom admin path".
- A new field should appear called "Custom Admin Path". Fill in the value you need here. For example: if you put in
new_admin, you will be able to login in the admin at the URL
According to Magento DevDocs
In Magento installation folder run this commande line :
php bin/magento setup:config:set --backend-frontname="THE_NEW_ADMIN_KEY"
And then check with :
php bin/magento info:adminuri
Quick answer (Using Magento 2 Admin settings):
- Log in the Magento 2 Admin interface
- Click Stores
- Click Configurations
- In the panel on the left, under Advanced, click Admin and expand the Admin Base URL section Set Use Custom Admin Path to “Yes”.
- Enter the Custom Admin Path. The path that you enter is appended to the
- Custom Admin URL after the last forward slash. For example:
- You will be logged out and redirected to the new Admin URL