How to Create Admin User in Magento 2 Using Command Line?

| |
1 mins read
how to create admin user using command line in magento 2

In this blog, we will learn about how to create admin user in Magento 2 using command line? To create admin user using command line we will use the bin/magento command.

The admin:user:create command is use to create new admin user via command line.

Now for example we create admin account with following information:

User : admin

Password : admin123

Email : admin@gmail.com

First Name : admin

Last Name : admin

sudo php bin/magento admin:user:create
–admin-user=”admin”
–admin-password=”admin123″
–admin-email=”admin@gmail.com”
–admin-firstname=”admin”
–admin-lastname=”admin”

After run above command you get below message,

“Created Magento administrator user named admin”.

Conclusion:

Using above steps, you can easily understand How to Create Admin User in Magento 2 using command line.If you have any query regarding above article then you can contact us or let us know in comment section.

Also, Learn: How to Create a Custom Query in Magento 2?

User Image
Author By

Vishal Lakhani

Vishal Lakhani, Founder and CTO of Rock Technolabs, brings over a decade of expertise in eCommerce development and Magento solutions. As a Magento Certified Developer, Vishal combines his technical know-how with a commitment to innovation, delivering high-quality results. Beyond his technical competency, Vishal is a passionate blogger who prioritizes quality content over quantity. Apart from blogging and playing with Magento, he enjoys reading, traveling, and learning something new every day.

Let's Discuss

Leave a Reply

Your email address will not be published. Required fields are marked *