Merhabalar,
Laravel projesi için koti42 dediği gibi VPS/VDS kullanılmalı. Fakat bence web siteniz; blog sitesi, kişisel web site, basit şirket sitesi vb. ise hosting'de iş görebilir.
Yapmanız gerekenler;
- Projenizi zip haline getirin.
- Hosting cpanele girin.
- Laravel versiyonuna göre php sürümünü ayarların
- Database kurulumunu yapın.
- E-posta oluşturun.
- dosya yönetici > public_html klasörünü açın
- Oluşturduğunuz zip dosyasını yükleyin / açın.
- .env dosyasını açın ve db, e-posta bilgilerini girin
- .htaccess adında dosyası oluşturun.
.htaccess dosyasını açın ve aşağıdaki kodu yazın.
<IfModule mod_rewrite.c>
# That was ONLY to protect you from 500 errors
# if your server did not have mod_rewrite enabled
RewriteEngine On
# RewriteBase /
# NOT needed unless you're using mod_alias to redirect
RewriteCond %{REQUEST_URI} !/public
RewriteRule ^(.*)$ public/$1 [L]
# Direct all requests to /public folder
</IfModule>