Host Laravel 8 project on cPanel easiest way

Hello everyone.

Lots of programmers having troubles while uploading laravel applications into a Cpanel shared hosting server.

even me in the first place. I spend some time figuring it the most common issues you may face while uploading the laravel application into Cpanel.

in this video, i am explaining all these issues and solutions

  • Uploading laravel app into Cpanel
  • Adding Htaccess file
  • Connecting with database
  • Handling env file error in MySQL database connection
  • Make it live

Upload Laravel 8 to Cpanel Step By Step

# First, you have to make a zip of your project on your computer.
Then you can open your Cpanel and upload that into it. All files should be in the public_html folder 

# Once you upload and extract the files we have to make an htaccess rewrite rule
(which is helps when someone visits the website they automatically go to the public directory)
You can find the code bottom of this page.

If you having a database with your project you have to go to your Cpanel and create a MySQL user and password also a database.

Once that is done, you have to export your database from your localhost and import it into your Cpanel database

You have to change the database details inside your env file. if you are getting can’t to connect error after this you can add a single quote ‘database username’ , ‘databasepassword’ like this in the env file.  Then it will work perfectly.

Learn How to upload Laravel 8 to Cpanel using this video

laravel 8 cpanel htaccess code

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]

Download .Htaccess File : 

Share with your friends:

Ajith Jojo Joseph

Self taught, dedicated young entrepreneur with many licensed products under his sleeve. Passionate about technology, business and excellence in general.

HTML Form to Email Using JavaScript and SMTP server 🚀

Hello Everyone, 🙋‍♂️ In this tutorial, we are going to look at how to send emails from HTML Form to […]

22 September, 2021

How to make pretty URL in PHP using .htaccess

Hello Everyone, Here in this tutorial, you will learn How to make a pretty URL in PHP using .htaccess. and […]

18 September, 2021

Submit Form Without Refreshing Page PHP and Javascript

Hello Everyone, In this tutorial, we are going to learn, How to submit a form without reloading. yeah, that’s so […]

HTML from to Email using SMTP in PHP with Source code

Hello Everyone, In this tutorial, I am going to teach you how to send an email from an HTML form […]

16 September, 2021


Subscribe to our weekly Newsletter and stay tuned.

Free PHP Invoicing Software

Gmax CRM Lite is an Invoicing and project management tool for small businesses, features including client management , invoicing , quotation and project management

Download for free