1. Make sure your Laravel project runs perfectly.

2. Zip your entire Laravel project folder.

3. Log in to cPanel.

Screenshot_1.png

4. Upload and Extract Project Files.

        1. Go to File Manager 
Screenshot_4.png
        2. Go to the public_html folder and click the Upload button.
Screenshot_2.png
          3. Upload your project ZIP file here.
Screenshot_5.png
             4. After completing the upload, go back to the public_html File.
Screenshot_3.png
              5. Select the ZIP file and click Extract to unzip it.
Screenshot_6.png
Screenshot_7.png
    6. After going to the unzipped fileselect all the files and move the public_html file directory                        
Screenshot_9.png
Screenshot_10.png
Screenshot_11.png
7.  We no longer need the project zip file, and we can delete it.
Screenshot_12.png
Screenshot_13.png

5. Configure the Database.

              1. In cPanel, go to “Manage My Databases” and create a new database.
Screenshot_14.png
          2.  Give a name for the database and click Create Database.
Screenshot_15.png
              3. Then go back to the cPanel dashboard.
Screenshot_16.png
          4. Open phpMyAdmin and Verify Your Database.
Screenshot_17.png
Screenshot_18.png

       5. Create a New Database User.

  •   Scroll down to Database Users.
  •   Click Add New User.
  •   Enter a username and a strong, secure password (you can use cPanel’s password generator).
  •   Click Create User.
Screenshot_19.png
Screenshot_20.png

6. Give the User Access to the Database.

  • Under Add User to Database, choose the user and the database you just created.
  • Click Add.
  • On the next screen, select ALL PRIVILEGES — this gives your Laravel app full control over the database.
  • Click Make Changes to save.                                              
Screenshot_21.png
Screenshot_22.png

7. Import Your Existing Database.

                                  1. Go back to phpMyAdmin in cPanel.
                                  2. Click on your newly created database (1).
                                  3. Select the Import tab from the top menu (2).
Screenshot_23.png
            4.  Choose your .sql file and click import to start the upload.
Screenshot_25.png
Screenshot_24.png

        5. Wait for the success message — your tables and data will appear shortly

Screenshot_26.png

8. Update Your Laravel .env File.

                 1. In File Manager, open your public_html folder.
                 2. Click the  Settings button and enable Show Hidden Files to reveal the .env file.
                 3. Right-click  .env → Edit.
Screenshot_28.png
               4. Update the following lines with your actual database details and save Changes.
                                   * APP_URL= your Domain
                                   * DB_DATABASE=your_database_name
                                   * DB_USERNAME=your_database_user
                                   * DB_PASSWORD=your_strong_password

                                    

Screenshot_29.png

9. After going to the public folder, select All files and copy to the /public_html/ folder.

Screenshot_30.png

             

Screenshot_31.png
Screenshot_32.png

1. Edit index.php File to Correct Paths

                     1. Open the public/index.php file in your Laravel project directory
Screenshot_33.png

  2. Remove the ( . . / ) part to correct the paths relative to the index.php  file, so        the modified lines look like

         * require __DIR__ . ‘/../vendor/autoload.php’;   ⟶   require __DIR__ . ‘/vendor/autoload.php’;
         * $app = require_once __DIR__ . ‘/../bootstrap/app.php’;    $app = require_once __DIR__ .              ‘/bootstrap/app.php’;

  3. Save the changes to index.php.

Screenshot_34.png

10. Go to your domain and refresh it.

Screenshot_35.png