19

I forgot to take note of the admin URI during installation.

Is there a way to retrieve it?

5 Answers 5

36

You can get it from app/etc/env.php file,

You have to get frontname from this file and suffix in your base url.

'backend' => 
  array (
    'frontName' => 'admin',
  ),

Or

php bin/magento info:adminuri

Now your value is http://127.0.0.1/magento2.1/admin

Remove cache and check in your browser.

1
35

You can get the details by below command in you Magento 2 instance.

php bin/magento info:adminuri

you can get the result like

Admin URI : /kqasuydi

Hope this is the simple and quick way to get.

2

Quick answer (Through file system):

You can also retrieve the the Magento 2 Admin URL in <your Magento install dir>/app/etc/env.php. Example of the relevant file content:

'backend' =>
    array (
       'frontName' => 'admin_test',
    ),

Quick answer (Using CLI):

php bin/magento info:adminuri

Where newadminpath is the new Magento 2 Admin URL

1

You can get admin url from app/etc/env.php

Check frontName in env.php

0

Go to app/etc from the root directory of your Magento 2 store. Here you can see env.php file and you can see the admin name:

<?php

return array (
 'backend' =>
 array (
   'frontName' => 'admin',
 )

You can also change the admin name by running the command in the root directory:

php bin/magento setup:config:set --backend-frontname="magento"

The above command will change the admin name as magento. You can access the admin panel by: www.domain.om/magento

Not the answer you're looking for? Browse other questions tagged or ask your own question.