This is a guide for complete newbies who want to install Laravel on shared hosting. This explains how to use Putty to install Composer which then installs Laravel on your server.
It is assumed you know how to navigate between directories from the command line (using commands like cd). If not read more here.
Note: Be sure to change “myprojectname” to your own project name and “path” to whatever your path may be if you are not installing in the root folder.
- Ensure that your webhost allows connection by SSH – you may need to get permission from your webhost or turn something on in the control panel
- Once peremissions are enabled, you will need to create a private SSH key in order for you to communicate with your server with Putty. In your control panel, create a private key then download it and save where it can be loaded later.
- Download Putty here.
- Run Putty with these settings:
- Port 22
- Your Host Name
- Under Connection > SSH > Auth – browse for the Private Key you just saved
- Under Connection > Data – put your webhost username if you want this sent automatically
The first time you do this you may get a warning message that the registry key is not cached. That is normal. Click OK to proceed.
- When you run with these settings you should reach a login screen. See here for more info about logging in with Putty if you have problems
- Once you are logged in to your server, navigate to the directory where you want to install Laravel. Perhaps it is the root (public_html) or a subdirectory (/path).
- Now you need to install Composer with this command:
curl -sS https://getcomposer.org/installer | php
- Now run composer with this command:
(it may take a while)
- Finally install Laravel with this command:
php-cli composer.phar create-project laravel/laravel myprojectname –prefer-dist
Laravel will now be installed at