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
php bin/magento info:adminuri
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
'backend' => array ( 'frontName' => 'admin_mageplaza', ),
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!
- How to create a simple Hello World module for Magento 2
- Magento 2 Block Template Ultimate Guides
- How to Create Module in Magento 2
- How to Create Controller in Magento 2
- How to create CRUD Models in Magento 2
- View: Layouts, Block and Templates
- Configuration - System.xml
- How To Create Admin Menu In Magento 2
- Admin ACL
Enjoyed the tutorial? Spread it to your friends!
Sam is the CEO and Founder of Mageplaza, pursuing a simple and healthy lifestyle. He is a friend, a husband, and a father to two children. As a trainer and an aspiring influencer, he is also a big fan of sports and travel. Sam is exceptionally knowledgeable about e-commerce, especially Magento and Shopify, with 10 years of experience in the field.