Laravel 5.7 Tutorial : How to Deploy Laravel 5* Projects on cPanel Shared Hosting??

Laravel 5.7 Tutorial : How to Deploy and setting Laravel 5* Projects on cPanel Shared Hosting 100% WORKS?? this work with laravel 5+

Laravel 5.7 Tutorial for Beginners : How to Deploy Laravel 5* Projects on cPanel Shared Hosting?? here's i'll show you simple upload laravel 5* projects and setting laravel on shared hosting or cPanel. This is important to know that laravel 5.1 up to laravel 5.4 is supported with PHP 5.6.4, but if your project build on Laravel 5.5 or newer your php server must PHP 7.0 or newer.

You can see more server requirements on this link https://laravel.com/docs/5.7

Video Tutorial Deploy Laravel 5 Projects to cPanel


Access cPanel

Go to your cPanel’s login page using its access IP address provided by your hosting provider.

Now log in to your cPanel and it will look like this. In this tutorial, we can upload laravel project using File Manager, MySQL® Databases, and phpMyAdmin features in cPanel.

But, on this tutorial i'll use WinSCP that SFTP and FTP client, download it from this link https://winscp.net/eng/index.php

Upload Laravel Project's

Using WinSCP please login with your FTP account and upload your laravel project into cPanel on Root directory (/).

After finished, move all file in the public folder of your laravel project to your public_html folder (/public_html/ or /public_html/newfolder/).

After all file (public file) has moved into public_html folder, just update your index.php with this code..

If your app is on /public_html/

require __DIR__.'/../laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/../laravel/bootstrap/app.php';

If your app is on other folder  /public_html/newfolder/

require __DIR__.'/../../laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../laravel/bootstrap/app.php';

So, you can access you application by following this address :
http://yoursite.com/
or
http://yoursite.com/newfolder

Connect to Databases

Assuming you are using Laravel with MySQL (which is the most common stack preferred by many), I will explain how to connect your MySQL database with the deployed project.You have to first create your database on your Shared hosting server. Open your cPanel and go to MySQL® Databases page.

Under Create New Database section, give your database a name and create database. Page will refresh and under Current Databases section, you will see your new database is also listed. Now go to MySQL Users section and create a database user. Your page will refresh and you will see your new user listed under the Current Users section. Now go to the Add User To Database Section and select your new user and new database, so that your user now can access and modify your database.

Update .ENV file

Onep your laravel folder on root directory, than update .env and update the following fields with new database information

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel54
DB_USERNAME=root
DB_PASSWORD=null

More Laravel Video Tutorial



Just like and subscribe our channel and get more awesome tutorial everyday for free. keep coding and see you next lessons ..

COMMENTS

Next Recomended


Feel free to code it up and send us a pull request.

Hi everyone, let's me know how much this lesson can help your work. Please Subscribe and Follow Our Social Media 'kodeajaib[dot]com' to get Latest tutorials and will be send to your email everyday for free!, Just hit a comment if you have confused. Nice to meet you and Happy coding :) all ^^



Follow by E-Mail


Name

ADO.NET,3,Ajax,6,Android,9,AngularJS,4,ASP.NET,4,Blogger Tutorials,7,Bootstrap,7,C++,1,Codeigniter,2,Cplusplus,6,Crystal Report,6,CSharp,25,Ebook Java,2,FlyExam,1,FSharp,3,Game Development,2,Java,35,JDBC,2,Laravel,84,Lumen,2,MariaDB,2,Ms Access,3,MySQL,31,ODBC,6,OleDB,1,PHP,14,PHP Framework,5,PHP MYSQLI,9,PHP OOP,5,Python,8,Python 3,4,SQL Server,4,SQLite,4,Uncategorized,5,Vb 6,2,Vb.Net,89,Video,48,Vue Js,4,WPF,2,Yii,3,
ltr
item
KODE AJAIB: Laravel 5.7 Tutorial : How to Deploy Laravel 5* Projects on cPanel Shared Hosting??
Laravel 5.7 Tutorial : How to Deploy Laravel 5* Projects on cPanel Shared Hosting??
Laravel 5.7 Tutorial : How to Deploy and setting Laravel 5* Projects on cPanel Shared Hosting 100% WORKS?? this work with laravel 5+
https://i.ytimg.com/vi/31VI81tlutg/hqdefault.jpg
https://i.ytimg.com/vi/31VI81tlutg/default.jpg
KODE AJAIB
https://www.kodeajaib.com/2018/10/how-to-deploy-laravel-on-shared-hosting.html
https://www.kodeajaib.com/
https://www.kodeajaib.com/
https://www.kodeajaib.com/2018/10/how-to-deploy-laravel-on-shared-hosting.html
true
3214704946184383982
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy