ApplikasiMesin Kasir

MESIN KASIR BLOG

How to upload Laravel to shared hosting - Cara upload laravel project ke hosting


For the first you must finished laravel project , after finished your project now you can upload to shared hosting. but how do this ??
*You must just compresed laravel project on .ZIP files.*
after compress upload on your cpanel hosting.

You can upload with 2 trick
1. Upload full laravel folders including public folder
2. Upload laravel project with move public folder on root.


You can follow instruction
1. Upload full laravel folders including public folder
For the first you must upload laravel folder .zip on cpanel hosting after upload extract it on root folder or sub folder , and for first you must create index.php files on root directori laravel project folder create new file and rename it with index.php and copy paste the code on index.php files <?php header(‘Location: public/’); ?> and save index.php files.
This tips for accsses and redirected laravel project with public folder for example like this https://laravel.com/public/helloworld

2. Upload laravel project with move public folder on root.
If you wana laravel project accsess full domain you can upload on your root folder on shared hosting, upload and extract .zip files, and move all files the public folder laravel on root folder.
After move all files,now you can edit on index.php files with this.

line 24 on index.php
standard on root folders
require __DIR__.'/../vendor/autoload.php';
if you upload in sub folder or not in root folder public_html so you must edited code like this
require __DIR__.'/../subfolder/vendor/autoload.php';

line 38 on index.php files
standard on root folders
$app = require_once __DIR__.'/../bootstrap/app.php';
if you upload in sub folder or not in root folder public_html so you must edited code like this
$app = require_once __DIR__.'/../subfolder/bootstrap/app.php';

and save index.php files.

Now you can test your laravel website or app projecton shared hosting. and viola..... congrats now your laravel project on the clouds.


and if you need web app or creative website call us for the best solutions.

Tidak ada komentar:

Posting Komentar

Mesin Kasir News