How to run laravel artisan command on server?

by ryan.murray , in category: PHP Frameworks , 5 months ago

How to run laravel artisan command on server?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by kadin , a month 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.