Magento Tutorials

How to Get Admin Path Command Line in Magento 2

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.

Syntax:

php bin/magento info:adminuri

Output:

Admin URI: /admin

Get Admin Path Via env.php File

First, navigate to the below-given path.

app\etc\env.php

Now, run the following code.

'backend' => [

        'frontName' => 'admin'

    ]

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]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

2 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

4 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

4 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

5 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

6 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago