Once the installation is completed, is there a posibility to change admin url? If yes how can I do that?
Change Admin Path
It is not recommended to change it directly from
app/etc/env.php, always prefer the CLI:
php bin/magento setup:config:set --backend-frontname="admin_path"
Do not add the first
/ in the
admin_path as it will result in an invalid parameter exception.
Change Admin URL
This can be done via the admin under Store > Advanced Tab > Admin Base URL section
One of coolest solution:
Goto magento >admin>Store>Advance>Admin Base Url>
Use Custom Admin URL field change value =YES
Then make Custom Admin URL as per as wise:
Note that: Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/
This will use If you want to change admin full url
If you want to change admin path then
Use Custom Admin Path =Yes and make
Custom Admin Path as per as your wise
you can change admin url using,
Change frontName equal to your required value,
'backend' => array ( 'frontName' => 'admin', //keep your custom url name here )
After changes your url, you must remove your var folder from root.
Now your admin url is like ,
You can change it from
return array ( 'backend' => array ( 'frontName' => 'admin', // change here ),
and clear your cache
You need to follow below steps to change admin url
- Go to app/etc/env.php and find 'frontName' and change that value
if your current admin url is www.yourdomain.com/admin then frontName value will be admin ('frontName' => 'admin' ) you need to change admin with your new word
- Run commands: static-content, reindex, cacha clean flush, di compilation
I 've just posted a blog post Magento 2 Admin URL that describes how to retrieve the current Magento 2 Admin URL and how to change the current Magento 2 Admin URL.
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
Quick answer (Using CLI):
php bin/magento setup:config:set --backend-frontname="newadminpath"
newadminpath is the new Magento 2 Admin URL
There are multiple ways to change the Admin URL in Magento 2.
Go to app/etc directory from the root directory of your store and open the env.php file in the text editor. Then change the frontName according to your choice:
return array ( 'backend' => array ( 'frontName' => 'magento', )
Lastly, run these commands:
rm -rf var/cache/* php bin/magento cache:clean php bin/magento cache:flush
You can also change it, via command line or through Admin Panel.
best this ->
php bin/magento setup:config:set --backend-frontname="yourchoice"
protected by Community♦ Jul 6 '18 at 9:31
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?