Search code examples
laravel-5hostingshared-hostingnamecheap

How to upload laravel project on namecheap hosting


can somebody please tell me how to upload laravel project on namecheap shared hosting. I am using php version 7.2 and laravel version 5.7.


Solution

  • If you mean how to deploy your project! Just Follow these steps :

    1. Create a new folder: example myfiles.

    2. Copy all your files to this folder.

    3. Go to myfiles -> public and copy these files to public_html (or your home folder - not myfiles).

    4. Open index.php and edit these lines : 24 & 38

    Like this :

    require __DIR__.'/myfiles/vendor/autoload.php';
    $app = require_once __DIR__.'/myfiles/bootstrap/app.php';
    
    1. Check your host documentation and upload your project.

    If you get an ERROR HTTP 500 after deploying your project, just upgrade PHP version to 7.2 and everything will work inchallah! ;)