Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sivaprasad's avatar

How to access php artisan commands in phpstorm

Any possibility of accessing php artisan commands in phpstorm from command line tool ?

In Homestead environment, php artisan commands are executing too slow hence i am expecting way to use same in phpstorm ide.

please provide help in this.

0 likes
10 replies
michaeldyrynda's avatar

PhpStorm does allow you to access a command line from within the IDE. Off the top of my head, I think the shortcut is Opt + F12. Keep in mind if your command touches the database, you won't be able to use it from your local machine as opposed to the Homestead environment, unless you're using a SQLite database.

sivaprasad's avatar

I am looking for php artisan commands...do we need to configure in phpstorm to execute commands ?

michaeldyrynda's avatar

You mean running the commands from PhpStorm directly? I haven't seen this functionality. They're just run on the command line, which you can do from the built in terminal.

michaeldyrynda's avatar

I don't think PhpStorm will be able to execute the commands within Homestead as that would require it to SSH into the box to run the commands. If you don't have PHP installed locally, you can't run the commands locally.

sivaprasad's avatar

I installed php internally however the setup which was mentioned is not working. Are you able to follow the steps and able to execute artisan commands ?

zahra's avatar

you can use phpstorm console using Ctrl+Shift+x short cut and run php artisan commands.

4 likes
berimbasket's avatar

تشکر میکنی چرا فارسی تشکر میکنی. why you thanks in persian man! خخخخ

alisanie's avatar

You can:

command+Shift+X and run php artisan .....

Or

1- Go to preferences and then

2- Tools -> Command Line Tools Support

3- Add New Command

4- Choose "Tools Base on Symphony Console" and visibility to "project"

5- In Alias Type for example "a" or "artisan"

6- In Path to script add artisan path that belongs to your project for example "project/artisan" (🚨 Its Should Be Absolute path)

7- Save it and use command+Shift+X

2 likes

Please or to participate in this conversation.