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 Magento 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
- Once you install the extension, go to Stores > Configuration > Magefan Extensions > Command Line Interface and enable it.
- Enter the PHP Command, so you can execute CLI commands even if you have a custom PHP route.
- 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)
- Select the Allowed Commands For Managers.
Note: here you choose the CLI commands only some admin users will be able to execute.
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.
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.
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.
After the command is executed, you will see the result.
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!