https://github.com/wendyliga/laravel-deployment-shared-hosting
Laravel Deployment Shared Hosting with or without SSH
https://github.com/wendyliga/laravel-deployment-shared-hosting
laravel shared-hosting ssh
Last synced: 2 months ago
JSON representation
Laravel Deployment Shared Hosting with or without SSH
- Host: GitHub
- URL: https://github.com/wendyliga/laravel-deployment-shared-hosting
- Owner: wendyliga
- License: mit
- Created: 2018-07-07T05:25:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-07T06:15:30.000Z (almost 8 years ago)
- Last Synced: 2025-10-26T02:46:04.164Z (8 months ago)
- Topics: laravel, shared-hosting, ssh
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Deployment Shared Hosting
Laravel Deployment on Shared Hosting with or without SSH
## Without SSH
### Laravel 5.5
1. Compress your Laravel Project and upload it to Root of your Shared Hosting
2. Extract your project to root of your Shared Hosting
3. Move all files in your `public` to `public_html` folder
4. open `server.php` in root of your server (Included in Laravel Project) , rename `public` word to `public_html`
before
```
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
```
after
```
if ($uri !== '/' && file_exists(__DIR__.'/public_html'.$uri)) {
return false;
}
require_once __DIR__.'/public_html/index.php';
```
5. Open `app\Providers\AppServiceProvider.php` and add this following code into `public function register()`
```
// override path.public
$this->app->bind('path.public',function(){
return base_path('public_html');
});
```
## SSH Supported
### Laravel 5.5
1. Do the following instruction on 'Without SSH'
2. Make sure your `.env` was configured
3. Force `composer` to update
```
composer install
```
4. Generate new key , then execute
```
php artisan key:generate
```
5. You Supposed to have no problem use your `artisan` and `composer` command
#### if you had git supported project
You could init your git in root of Shared Hosting and add this following `.gitignore` to prevent unnecessary file push to your git repository
[grab your .gitignore here](https://github.com/wendyliga/laravel-deployment-shared-hosting/blob/master/gitignore_ssh.md)
# Next Steps
Happy Code Guys
# Feedback
Please don't hesitate for [issuing](https://github.com/wendyliga/laravel-deployment-shared-hosting/issues) something that doesn't work for you, I will really happy to help you