I actually wanted to follow up on this question, but I guess It’s better to start a new question.
I installed a fresh copy of my own laravel(5.0), and I tried running php artisan route:list, which works.
Now I have downloaded the compressed repository of a project I want to deploy on a shared hosting enviorment, but when I run php artisan route:list nothing happens.(No error message, nothing). Using this method for hosting the application
The actual problem is php artisan migrate
, which also outputs nothing!
Is there a good method for troubleshooting this ? Could you provide me we some points of failure that I can check ?
Worth mentioning:
I’m no Laravel developer and I have limited time reading up on it.
Advertisement
Answer
As LittleFinger suggested, it’s possible that artisan is not actually yet installed. When deploying from a repo, Laravel’s packages of which the entire framework core is composed, are not included. You should run composer install to install the packages. If you don’t have composer installed that can be difficult on shared hosting, but it’s usually possible to install it.
You will need to run composer install before you run composer update. Running composer update is not required, unless you want to update to the newest versions of your packages which are allowed by the rules in your composer.json file. This should be done with care in a production environment as new versions of packages could break your app.
Once you’ve installed the packages, you’ll need to set your environment variables (database credentials etc.) by copying the .env.example file to .env and editing it. Once you’ve done this you’ll be able to run php artisan key:generate to generate an encryption key.
After this, your app should work (assuming you’ve pointed a domain to the /public directory).