Note that you should have python2 installed
npm install
npm run production
composer install --optimize-autoloader --no-dev --ignore-platform-reqs
Note1: if you are using sqlite as your database, first use the command below to create a database file
php artisan make:sqlite
First generate .env file by copying .env.example and change the configurations as required.
Make sure database credentials are added to the .env file (For sqlite, just make DB_CONNECTION=sqlite and delete other db credentials)
Then, type the commands below
php artisan key:generate
php artisan migrate:fresh --force --seed
php artisan migrate --force --path=vendor/laravel/passport/database/migrations
php artisan passport:install --force
php artisan storage:link
php artisan ensure:install
Finally, to deploy on the server, do all the above and cache the files as stated below for faster processing speeds
php artisan config:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache