top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

What are all the ways to change your Magento 2 admin url?

0 votes
posted 5 days ago by Velanapps

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

There are various method try one of the following -

1) Using Magento 2 Command Line
Open the terminal or command prompt and navigate to the directory in which the Magento 2 is installed. Enter the following command to change the Admin panel URL:

php bin/magentosetup:config:set --backend-frontname="myadmin"

2) Changing the admin path in Config.php
After Magento 2 is successfully installed, the admin URL will get saved in an environment configuration file called as env.php located in the following path:


The file looks like this:

return array (
  'backend' => 
  array (
    'frontname' => "myadmin"

You can change the admin path by modifying the value against‘frontName’.

3) Using admin panel configuration
Simplest option to change the admin panel URL.
* Login to the Magento 2 admin panel URL and navigate to Stores ->Configuration.
* Under the Advanced section, click on the Admin menu item.
* Expand the Admin Base URL section and set the value of the Use Custom Admin Path to Yes.
* Use the Custom Admin Path text field to specify the custom admin ‘frontname’ and save the configuration.

Source : Internet

answer 5 days ago by Salil Agrawal
Similar Questions
+2 votes

Last week we had a very strange problem with the admin login of a Magento client of ours. When we tried to login we would get a session id in the url and everything seemed to work, but we were redirected to the same login box.

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.