How to run laravel artisan command on server?

by ryan.murray , in category: PHP Frameworks , a year ago

How to run laravel artisan command on server?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by kadin , 7 months ago

@ryan.murray 

To run Laravel artisan command on a server, you can use SSH to access the server and then navigate to the root directory of your Laravel project. Once you are in the root directory, you can run artisan commands by using the following format:

1
php artisan <command>


For example, to run the migrate command, you would use:

1
php artisan migrate


Make sure that you have appropriate permissions to run artisan commands on the server. It is also a good practice to run commands in a screen session or make sure that your SSH connection will not get disconnected during the command execution.

Related Threads:

How to echo output of artisan::call() in laravel?
How to clear cache in Laravel without artisan?
How to run a script on server using fastapi?
How to fix "php artisan migrate" error in laravel?
How run exec command with symfony process?
How to run sleep command in vagrant file?