If you don't have SSH access or just don't want to use a terminal, you can use Command Line Interface instead to run commands directly from the admin panel.

That's when Magento 2 Command Line Interface extension comes into play! Since it allows you to execute commands in a few clicks without even typing the commands manually, you really have to try it.

So, let's find out more about what it allows you to do by configuring it.

Configure Command Line Interface

  1. Once you install the extension, go to Stores > Configuration > Magefan Extensions > Command Line Interface and enable it.
  2. Enter the PHP Command, so you can execute CLI commands even if you have a custom PHP route.
  3. Select the Most Used Magento 2 Commands you use the most often to have them at the top on the CLI page. (learn about CLI page later in this article)
  4. Select the Allowed Commands For Managers.

Note: here you choose the CLI commands only some admin users will be able to execute.

Magento 2 CLI Extension Configuration

To restrict some admin users' access to the Command Line Interface you can remove Command Line and Command Line Admin sections from the admin user role.

Learn more about how to create admin users or user roles in Magento 2.

Command Line Access in Magento 2

If you still want to grant your admin users access to CLI, you can choose only certain commands they will be able to run. You choose them in the Allowed Commands for Managers field.

Run CLI Commands

1. Go to System > Tools > Command Line by Magefan and enter Your Password to start running the commands. This field makes CLI usage more secure.

Magento 2 Command Line Interface

2. Choose the command you want to execute, press the arrow near the command ( ▶) and confirm you want to execute it.

Note: most used CLI commands are at the top. Go back to the extension configuration to set them.

Execute Command Line Interface in Magento 2

After the command is executed, you will see the result.

Run CLI Commands from Magento 2 Admin Panel

Magento 2 Command Line Interface extension is " The most missing extension for Magento 2 for customers and developers" as some of our customers claim.

Want to know if it is true? Try it now!

Go to the product page to check out Magento 2 Command Line Interface extension!