Since you have SSH access do this:
Filesystem
- SSH into the server
- Change directory to the project root
cd /home/< username >
- delete the
public_html
folderrm -rf public_html
- create a symbolic link from
public
topublic_html
ln -s /home/< username >/public /home/< username >/public_html
- Install Laravel dependencies
composer install
- Change permissions
chmod -R 755 *
chmod -R 777 storage/ bootstrap/cache/
Checklist
- Make sure your environment file uploaded and is proper.
- If the server is Apache, make sure you uploaded the
.htaccess
files. - You probably uploaded all the assets, if so you will not need to do bower or npm.
- Restart the server.
**In Case of a Limited Shell Environment
- Install Laravel dependencies locally and upload the
vendor
folder with everything else. - Instead of uploading the whole Laravel app to
/home/< username >/
upload it to/home/< username >/public_html
. -
Modify your
/home/< username >/public_html/.htaccess
to redirect all requests to thepublic
subfolder.# /home/< username >/public_html/.htaccess <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect All Requests To The Subfolder RewriteRule ^ /public </IfModule>
-
Make sure you have the proper
/home/< username >/public_html/public/.htaccess
(GitHub).# /home/< username >/public_html/public/.htaccess <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>
3
solved How to install LARAVEL 5