How to Host Laravel project in cPanel easiest way ✔️

Do you know how to host a Laravel project in Cpanel? 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.

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 in 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 are Laravel Developer you should checkout our other laravel tutorials

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]
</IfModule>

Download .Htaccess File : 

If you follow the step which I am explained in the video you could be able to host your Laravel application.

Post Your Questions on our forum

Post a question on Forum

Ajith Jojo Joseph

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

Share with your friends:

Leave a Reply

Your email address will not be published. Required fields are marked *

How to integrate Paypal API in Laravel

Are you looking to integrate Paypal API in your Laravel project for seamless payment processing? Look no further! In this […]

April 3, 2024

How to integrate Razorpay API in Laravel

Integrating payment gateways into web applications has become an essential part of e-commerce websites. In this tutorial, we will discuss […]

April 3, 2024

Laravel 11 Ajax CRUD Operation Tutorial Example

**Mastering CRUD Operations with Laravel 11 Ajax: A Comprehensive Tutorial** In the world of web development, interaction between the front-end […]

April 3, 2024

Login as Client in Laravel – Login with user id

**Unlock the Power of Laravel with Login as Client – Login with User ID** Laravel, the popular PHP framework, offers […]

April 3, 2024

Digital Marketing Toolkit

Get Free Access to Digital Marketing Toolkit. You can use all our tools without any limits

Get Free Access Now