Run the following command in your application’s root directory:
php ./bin/cli.php admin:create-admin -i {IDENTITY} -p {PASSWORD} -f {FIRST_NAME} -l {LAST_NAME}
OR
php ./bin/cli.php admin:create-admin --identity {IDENTITY} --password {PASSWORD} --firstName {FIRST_NAME} --lastName {LAST_NAME}
after replacing:
If the specified fields contain special characters, make sure you surround them with double quote signs this method does not allow specifying an admin role – newly created accounts will have a role of admin.
If the submitted data is valid, the outputted response is:
Admin account has been created.
The new admin account is ready to use.
You can get more help with this command by running:
php ./bin/cli.php help admin:create