- After Magento setup is done then admin can able to change the admin URL from admin section.
In few way we can change the admin URL
1. Using Command Line script
php bin/magento setup:config:set –backend-frontname=”<SETADMINURLHERE>”
2. File level. From the following file path app/etc/env.php, update admin frontname
<?php
return array (
‘backend’ =>
array (
‘frontName’ => ‘<SETADMINURLHERE>’,
)
?>
3. From admin section, redirect to below admin section & set the path
admin – Stores – Configuration – Admin – Admin Base URL
4. Or You can update the admin fields value by using Direct MySql query.
- Once admin URL is changed then need to do following steps,
- Clear/Flush the cache
- Do content deploy once