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

| |
Comments: 0
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?

Leave a Reply

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