Hello, Magento Friends!

Today I am here to help you all with How to Get Admin Path Command Line in Magento 2. You can add the command in bin/magento. However, we will guide you with the proper command and output of it. 

The Admin URL is nothing but the URL which can be used to access the backend or the admin panel of your Magento 2 store. The admin panel can be used to view, edit and manage everything from extension, order data, customer, and set your checkout also. Can be regarded as a center of information for your Magento store.

There are both ways to get the admin path. From the command line or by running the code in your php file.

Let’s get rolling!

How to Get Admin Path Command Line in Magento 2?

Get Admin Path Via Command Line

First, open the command prompt or terminal. Then, run the below-given command in Magento 2 root directory to retrieve the Admin path.



Get Admin Path Via env.php File

First, navigate to the below-given path.


Now, run the following code.

That’s it!

Summing It Up:

Run the above code properly and you will surely get the desired output. We hope this helped. Also, Hire a Dedicated Magento Developer for your E-commerce business and custom-develop your store with the guidance of our certified developers.

Share this article with your Magento friends.

Have a G’day!

Happy Reading!

Click to rate this post!
[Total: 5 Average: 5]