banner



How To Create Configurable Product In Magento Step By Step

In this tutorial, we will talk about How to Add Admin User via Command Line in the Command Line Series. As you know, from Magento 2, they add many commands in bin/magento. This may be difficult to approach, let me explain more detail about How to Add Admin User via Command Line.

Who will need this guide?

While creating admin users manually from the backend is the most basic method. Creating admin user accounts via command lines has some advantages over if you are in these following conditions:

  • You want to save time in creating an admin account by using the command lines instead of filling out multiple fields in the Account Information in the store's backend
  • You are a developer and your client need you to log in a backend without knowing any admin accounts
  • You need to create multiple admin accounts in a short time

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

After having the server access, go to Magento admin root folder and show usage:

            php bin/magento admin:user:create --help                      

Output:

            Usage:   admin:user:create [options]  Options:       --admin-user=ADMIN-USER                    (Required) Admin user       --admin-password=ADMIN-PASSWORD            (Required) Admin password       --admin-email=ADMIN-EMAIL                  (Required) Admin email       --admin-firstname=ADMIN-FIRSTNAME          (Required) Admin first name       --admin-lastname=ADMIN-LASTNAME            (Required) Admin last name       --magento-init-params=MAGENTO-INIT-PARAMS  Add to any command to customize Magento initialization parameters                                                  For example: "MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache"   -h, --help                                     Display this help message   -q, --quiet                                    Do not output any message   -V, --version                                  Display this application version       --ansi                                     Force ANSI output       --no-ansi                                  Disable ANSI output   -n, --no-interaction                           Do not ask any interactive question   -v|vv|vvv, --verbose                           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug  Help:   Creates an administrator                      

For example, now we are going to create an admin account with the following information:

  • User: mageplaza
  • Password: WeLoveMagento
  • Email: [email protected]
  • First Name: Mageplaza
  • Last Name: Family

So here is the command line:

            php bin/magento admin:user:create --admin-user=mageplaza --admin-password=WeLoveMagento [email protected] --admin-firstname=Mageplaza --admin-lastname=Family                      

It shows an error: Your password must include both numeric and alphabetic characters. The password should be more complex.

  • Password: WeLoveMagento123
            php bin/magento admin:user:create --admin-user=mageplaza --admin-password=WeLoveMagento123 [email protected] --admin-firstname=Mageplaza --admin-lastname=Family                      

Now, we successfully created a new admin account. The system returns this message:

            Created Magento administrator user named mageplaza                      

Now to go to admin login page, and fill the above information

magento 2 login

and you are in now, see this screenshot

magento 2 admin pannel

Hope this guide can help you to tackle the question. If you have any questions regarding admin user accounts in Magento 2, don't hesitate to let me know in the comment section!

Want to explore more on managing the admin permissions? Click on the button below:

Advanced Admin Permissions

How To Create Configurable Product In Magento Step By Step

Source: https://www.mageplaza.com/devdocs/magento-2-add-admin-user-command-line.html

Posted by: engelhardtbusert.blogspot.com

0 Response to "How To Create Configurable Product In Magento Step By Step"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel