Nexx Enterprise

How to upload laravel app to shared hosting

Please follow these steps:

  • Create a subdomian name
  • After successfully domain added in cPanel go to Filemanager->
    public_html and find a folder name (Do Not Create
    it Manually). If you don’t find it delete the subdomain from cPanel and
    create the domain again.
  • Now from  cPanel find Let’s Encrypt SLL and click on it. On the new page scroll down and from issue a new certificate

Lets Encrypt SLL

  • Now go to file manager again and create a folder named testpharma outside the public_html (for example we have pharma folder) folder and upload complete laravel app folder in it. Upload via zip folder or FTP.
  • Once uploaded move the public folder from testpharma folder to folder inside public_html folder.
  • Now open and find index.php and change the path for bootstrap and autoload.php to testpharma folder outside public_html folder. See example in image.
  • Create the database with name testpharma in using MYSQL wizard from cPanel and edit your .env file same.
  • Export the database for your laravel apop from localhost/phpmyadmin and import it in testpharma database you created.
  • Create a symlink.php file to link laravel storage folder to your public folder to access media files publically. Upload symlink.php to folder inside public_html.

        symlink(‘/home/bwkdlfta/testpharma/storage/app/public/’, ‘/home/bwkdlfta/public_html/’);

  • Go to and delete the storage folder and then to go it will create a folder in named storage. If you don’t find any folder named storage with a link sign on it. Please check your code and retry.
  • Your application is ready to use. Now try accessing your application should work. If not, enable app debug and find the error.