Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

How to Get admin path Command Line in Magneto 2 through Code

Vinh Jacker | 03-17-2025

How to Get admin path Command Line in Magneto 2 through Code

In this tutorial, we will demonstrate how to get admin path command line in Magento 2 which is one of tutorials our in Command Line Series.

Get Admin Path command line

Commands syntax:

php bin/magento info:adminuri

Output:

Admin URI: /admin_mageplaza

So the path is /admin_mageplaza, now navigate your browser to domain.com/admin_mageplaza to access to Magento 2 backend.

Get Admin path in env.php file

Do you know? You can get admin path without access to etc/env.php file.

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

Wrap up

That’s how you can get back your admin path command line in Magento 2 in case you have forgotten it.

I hope this is a useful tutorial for you.

Thank you for reading!

x
    Jacker

    Jacker is the Chief Technology Officer (CTO) at Mageplaza, bringing over 10 years of experience in Magento, Shopify, and other eCommerce platforms. With deep technical expertise, he has led numerous successful projects, optimizing and scaling online stores for global brands. Beyond his work in eCommerce development, he is passionate about running and swimming.



    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services