Changing Admin URL in Magento 2 is as simple as changing URL in Magento 1 so you don’t need to worry about it -:
Step 1 : Go to your Magento installation directory and open /app/etc/env.php file
return array (
‘backend’ =>
array (
‘frontName’ => ‘siteadmin’, //change the frontName here to change the Admin URL
)
Step 2: Clear the cache using the following command or by removing all files from var/cache
rm -rf var/cache
That’s it, now you have the new Magento admin URL. As you can see changing Admin URL in Magento 2 can’t be easier 🙂
Hope this article helped you in some way. Please leave us your comment and let us know what do you think? Thanks.
this is not working .
Giving the following error :
Whoops, our bad…
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
this is the settings in env.php
array (
‘frontName’ => ‘nischal2’,
Hi Nischal,
Can you please confirm that you are doing this for backend?
return array (
‘backend’ =>
array (
‘frontName’ => ‘nischal2’, //change the frontName here to change the Admin URL
)
And you have cleared caches? Thanks
The mentioned method works perfectly. Thank You for this great post.
Hi, it was a good read! It was a quick and concise explanation.