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

alihuseyin's avatar

shared hosting run php artisan command

Hello, I upload my laravel project to a shared hosting and I wonder if I can run php artisan commands from local? Or what is the easiest way of running those commands in shared hosting?

0 likes
10 replies
dbapro's avatar

Your first mistake is using shared hosting. It's much better to run Laravel on a VPS or a dedicated box.

Snapey's avatar

I have a number of tiny projects that run on shared hosting and I build a local copy and run all commands there, then FTP the project folder to the shared host.

The sites I have that are on dedicated hosts are much easier to manage but it is possible to use shared hosting.

alihuseyin's avatar

@snapey have u ever tried to set up ssh acces in ur shared hosting and run commands there?

Snapey's avatar

Its down to the provider whether they allow SSH or not.

One provider gave 'restricted' SSH access but then it would only run php 5.4 from the command line even though the website itself was on php 7.0

gthuo's avatar

You can also run artisan commands from routes or controller using Artisan::call('cache:clear'); // or whatever command you want to run

3 likes
hupp's avatar

@Snapey Yeah i found this thread, similarly recent thread so also put on link here. So anyone else in future can also use it.

Please or to participate in this conversation.