Shared hosting providers provide cPanel to their users with the help of which they can deploy their projects and also provide other features which can be used to configure their projects.
Let’s start to deploy laravel project on shared hosting cpanel:
Step 1: Compress Your Laravel Project
In your local system, Compress your laravel project folder and create a zip file.
Step 2: Log in to Shared Hosting Cpanel
Open your browser and Log in to in your cpanel account with your login details.
Step 3: Upload Your Laravel Project to SHC
Go to cpanel, and find File Manager and open the public_html
folder. And Upload your Laravel project zip file in it.
Step 4: Unzip Uploaded Zip File
Now, Right-click on the uploaded zip file to unzip it on your cpanel public_html
folder.
Step 5: Configure Your Laravel Project
Now move all the files from the laravel_project/public
directory to the public_html
directory.
Step 6: Create and Set Up the Database
Now go to cPanel’s MySQL Database Wizard and create a MySQL database and a database user, And then edit the .env file and setup your database details in it.
Step 7: Import Database
Open phpmyadmin from your shared hosting cpanel and import your database in it
Step 8: Test Your Application
Type your ip address or your domain in a web browser to test if your Laravel 11 application is running correctly.