How to Upload a Laravel Application :
What is Laravel ?
Laravel is a Trending PHP Framework and is very famous now a days. It is Much Secure than normal php applications. Development in Laravel is quick and easy to code but Hosting a Laravel application is a bit tricky. So Be attentive while Reading it.
Steps for Uploading a Laravel Application:
Here are the Steps for Uploading a Laravel Application to Shared Hosting.
- STEP 1: Firstly Open your Laravel Application Folder in your local Computer
- STEP 2: Now there are many files and folders present there in the Laravel Application Folder
- STEP 3: Select Everything present there Except Public Folder present in the Application Folder
- STEP 4: Compress those files in a Zip or RAR file so that it can be uploaded
- STEP 5: When Completed Compressing those files, Select the public folder and compress it in another Zip or RAR file
- STEP 6: After Completion of both the Zip or RAR files, Copy them to Desktop
- STEP 7: Now, You have to upload these files to your shared hosting.
- STEP 8: You can use any method to do this that may be through FTP or Manually upload these files to the hosting using file manager in the Cpanel.
- STEP 9: Now you have to upload the public folder that you have Compressed in STEP 5 into the public_html folder in your cpanel and upload the other folder in your root directory along where public_html lives and name the folder as laravel (or whatever you like).
- STEP 10: Extract Them both and then edit the index.php file in the public_html folder. In the Index.php file, Change these lines FROM:require __DIR__.'/../vendor/autoload.php';$app = require_once __DIR__.'/../bootstrap/app.php';To:require __DIR__.'/../laravel/vendor/autoload.php';$app = require_once __DIR__.'/../laravel/bootstrap/app.php';THAT'S IT !!You are READY to Go !!Open your website URL and its working now !!Thanks for Reading !!If you Liked the Article Please Like and Comment !!