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!
Sam is the CEO & co-founder of Mageplaza, a company established to support Magento merchants with different powerful tools and resources. Sam Nguyen is also the CEO & founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore – aiming to support more than a million online businesses to grow and develop.
- 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
- Admin Grid
API-GraphQL
Ajax Search
$149
17 reviews
PWA-ready
API-GraphQL
Automatic Related Products
$249
43 reviews
Salesforce CRM Integration
$349
5 reviews
-20%
Sales Booster
$318 ($397)
-20%
Marketing Solution
$278 ($347)
PWA-ready
API-GraphQL
Reward Points
$99
28 reviews
API-GraphQL
Layered Navigation
$149
101 reviews
API-GraphQL
Store Locator
$199
12 reviews