18th July 2024

Get able to discover ways to deploy a Laravel mission on cPanel. Our cPanel Help group is right here to assist along with your queries and points.

deploy Laravel mission on cPanel

In case you are having bother deploying a Laravel mission on cPanel, you will have come to the proper place. Our specialists have put collectively this helpful information that can assist you out.How to deploy Laravel project on cPanel

  1. First, we’ve to compress the Laravel mission in order that it’s straightforward to add it on cPanel.
  2. Subsequent, we’ve to log in to our cPanel account.
  3. Then, click on File Supervisor and create a brand new folder within the root folder.
  4. After that, add the compressed Laravel mission zip file to the newly created folder.
  5. Subsequent, extract the recordsdata within the zip file after which transfer them to the folder we created in Step 3. Keep in mind to delete the /Laravel path.
  6. Then, we’ve to find the index.php file and make adjustments to the next strains:

    require __DIR__.'/../vendor/autoload.php';

    to

    require __DIR__.'/../newfolder/vendor/autoload.php';

    and

    $app = require_once __DIR__.'/../bootstrap/app.php';

    to

    $app = require_once __DIR__.'/../newfolder/bootstrap/app.php';

    Keep in mind to switch newfolder with the identify of the folder we created in Step 2.

  7. Now, we’ve to go to the database tab.
  8. Subsequent, click on MySQL Databases to create a database after making a person by scrolling down. This person can have all privileges on the database.
  9. After creating the database, head again to the File Supervisor and add the credentials to the .env file.
  10. Then, we’ve so as to add the SQL file we exported to the host. We are able to do that by logging in to PHPMyAdmin.
  11. At this level, we’ve to go to public_html folder and create a brand new file after which identify it symlink.php.
  12. Subsequent, open the symlink.php file and add the next line:

    symlink("path/to/the/storage/public/folder(supply)","path/to/the/public/folder(vacation spot)");

    Then save and exit the file.

  13. We are able to run the file, by going to the conventional area identify and appending the hyperlink to the file as proven beneath:

    area.com/symlink.php

    Now, we are able to delete the symlink.php file and all our pictures and recordsdata will probably be accessible.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

To sum up, our Help Techs demonstrated find out how to deploy a Laravel mission on cPanel.

PREVENT YOUR SERVER FROM CRASHING!

By no means once more lose prospects to poor server pace! Allow us to provide help to.

Our server specialists will monitor & keep your server 24/7 in order that it stays lightning quick and safe.

GET STARTED

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.