1. Requirements
| Komponen | Versi Minimum |
|---|---|
| PHP | 8.3 (wajib — Laravel 13 drop PHP 8.2) |
| Composer | 2.x |
| MySQL | 8.0 / MariaDB 10.5 |
| Node.js | 18 (hanya untuk build ulang aset) |
| Ekstensi PHP | pdo, mbstring, openssl, tokenizer, xml, ctype, json, bcmath, fileinfo, gd, curl, zip |
php -v
php -m | grep -iE "pdo|mbstring|gd|fileinfo|bcmath|curl|zip"
Laravel 13 dirilis 17 Maret 2026 dan hanya mendukung PHP 8.3–8.5. Jika hosting masih PHP 8.2, minta upgrade dulu.
2. Instalasi via Shared Hosting (cPanel)
2.1 Upload file
- Login cPanel → File Manager.
- Masuk ke
public_html/. - Upload
goldenstreet-property-v1.0.zip, lalu Extract.
2.2 Pindahkan public/
cd ~/public_html
mv public/* .
rm -rf public
Edit index.php di root:
// Ganti:
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
// Menjadi:
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
Atau set Document Root ke public_html/public via cPanel → Domains.
2.3 Buat database
cPanel → MySQL Databases → buat database + user → Add User to Database → ALL PRIVILEGES. Catat kredensial.
2.4 Konfigurasi .env
cp .env.example .env
APP_NAME="GoldenStreet Property"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://domainanda.com
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=namauser_properti
DB_USERNAME=namauser_admin
DB_PASSWORD=password_kuat
SESSION_DRIVER=database
SESSION_DOMAIN=null
QUEUE_CONNECTION=database
CACHE_STORE=database
FILESYSTEM_DISK=public
THEME_DEFAULT=default
MAIL_MAILER=smtp
MAIL_HOST=mail.domainanda.com
MAIL_PORT=587
MAIL_USERNAME=noreply@domainanda.com
MAIL_PASSWORD=password_email
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@domainanda.com
MAIL_FROM_NAME="${APP_NAME}"
TELEGRAM_BOT_TOKEN=
TELEGRAM_ADMIN_CHAT_ID=
MIDTRANS_SERVER_KEY=
MIDTRANS_CLIENT_KEY=
MIDTRANS_IS_PRODUCTION=false
Laravel 13 — cache serialization: tambahkan
serializable_classes di config/cache.php jika meng-cache model/collection.2.5 Install dependency
cd ~/public_html
composer install --no-dev --optimize-autoloader
2.6 Generate key & migrate
php artisan key:generate
php artisan migrate --seed
php artisan storage:link
2.7 Permission & optimize
chmod -R 775 storage bootstrap/cache
php artisan optimize
3. Instalasi via VPS (Ubuntu 22.04)
3.1 Install PHP 8.3
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y nginx mysql-server \
php8.3-fpm php8.3-cli php8.3-mbstring php8.3-xml php8.3-bcmath \
php8.3-curl php8.3-zip php8.3-gd php8.3-mysql \
unzip git composer
3.2 Setup proyek
cd /var/www
sudo git clone <repo-url> goldenstreet
cd goldenstreet
sudo chown -R www-data:www-data .
sudo cp .env.example .env
sudo nano .env
sudo composer install --no-dev --optimize-autoloader
sudo php artisan key:generate
sudo php artisan migrate --seed
sudo php artisan storage:link
sudo chmod -R 775 storage bootstrap/cache
sudo php artisan optimize
3.3 Nginx config
server {
listen 80;
server_name domainanda.com www.domainanda.com;
root /var/www/goldenstreet/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
}
location ~ /\.(?!well-known).* {
deny all;
}
client_max_body_size 20M;
}
sudo ln -s /etc/nginx/sites-available/goldenstreet /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d domainanda.com -d www.domainanda.com
4. Cron Setup (WAJIB)
4.1 cPanel → Cron Jobs
Cron #1 — Scheduler (* * * * *):
cd /home/USER/domains/DOMAIN/public_html && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1
Cron #2 — Queue Worker (* * * * *):
cd /home/USER/domains/DOMAIN/public_html && /usr/local/bin/php artisan queue:work --stop-when-empty --tries=3 --timeout=60 >> storage/logs/queue.log 2>&1
4.2 VPS → crontab
sudo crontab -u www-data -e
* * * * * cd /var/www/goldenstreet && php artisan schedule:run >> /dev/null 2>&1
* * * * * cd /var/www/goldenstreet && php artisan queue:work --stop-when-empty --tries=3 --timeout=60 >> storage/logs/queue.log 2>&1
4.3 Verifikasi
php artisan schedule:list
crontab -l
tail -n 20 storage/logs/queue.log
5. Setup Telegram (Opsional)
5.1 Buat bot
- Buka @BotFather →
/newbot→ dapat token. - Buka bot Anda → klik Start.
- Chat ID:
https://api.telegram.org/bot<TOKEN>/getUpdates→ cari"chat":{"id":...}.
5.2 Set .env
TELEGRAM_BOT_TOKEN=123456:ABC...
TELEGRAM_ADMIN_CHAT_ID=8813225682
5.3 config/services.php
'telegram-bot-api' => [
'token' => env('TELEGRAM_BOT_TOKEN'),
],
'telegram' => [
'admin_chat_id' => env('TELEGRAM_ADMIN_CHAT_ID'),
],
5.4 Test
php artisan config:clear
php artisan tinker
>>> \NotificationChannels\Telegram\TelegramMessage::create()
... ->to(config('services.telegram.admin_chat_id'))
... ->content('Test dari server')
... ->send();
5.5 Revoke token (jika bocor)
@BotFather → /revoke → token baru → update .env → php artisan config:clear.
6. Setup Midtrans (Opsional)
- Daftar di midtrans.com.
- Settings → Access Keys → copy Server Key & Client Key (Sandbox).
- Set
.env:MIDTRANS_SERVER_KEY=SB-Mid-server-xxx MIDTRANS_CLIENT_KEY=SB-Mid-client-xxx MIDTRANS_IS_PRODUCTION=false - Payment Notification URL:
https://domainanda.com/payment/webhook. - Test order renewal → cek status
paid.
7. Theme Activation
Login admin → /admin/tema → Aktifkan tema (default, minimal, bold).
8. Login Awal
| Role | Password | |
|---|---|---|
| Super Admin | superadmin@example.com | password |
| Owner | owner@example.com | password |
| Seeker | seeker@example.com | password |
Segera ganti password setelah login pertama.
9. Troubleshooting (Laravel 13)
| Error | Penyebab | Solusi |
|---|---|---|
Composer requires PHP 8.3 | Hosting PHP 8.2 | Upgrade PHP ke 8.3 |
__PHP_Incomplete_Class | serializable_classes default false | Tambahkan class ke config/cache.php |
PreventRequestForgery error | Laravel 13 ganti VerifyCsrfToken | Cek bootstrap/app.php |
500 Internal Server Error | APP_DEBUG=false | Set APP_DEBUG=true sementara, cek log |
The only supported ciphers are AES-... | APP_KEY kosong | php artisan key:generate |
SQLSTATE[HY000] [1045] | DB salah | Cek .env |
Class "..." not found | Autoload stale | composer dump-autoload |
413 Request Entity Too Large | Upload > limit | Naikkan upload_max_filesize |
| Gambar tidak muncul | storage:link belum | php artisan storage:link |
Telegram token not provided | services.telegram-bot-api.token belum | Tambah di config/services.php |
| Cron tidak jalan | Path php salah | which php, pakai path absolut |
| Queue menumpuk | Cron queue belum | crontab -l, tambah cron queue |
10. Upgrade dari Laravel 12
- Upgrade PHP ke 8.3+.
- Update
composer.json:"require": { "php": "^8.3", "laravel/framework": "^13.0", "laravel/tinker": "^3.0" }, "require-dev": { "phpunit/phpunit": "^12.0", "pestphp/pest": "^4.0" } composer update --with-all-dependencies.- Cek
config/cache.php— tambahkanserializable_classesjika meng-cache model. - Cek
PreventRequestForgery— jika ada kustomisasiVerifyCsrfToken, sesuaikan. - Jalankan test:
php artisan test.
11. Backup
# Harian (cron 02:00)
mysqldump -u user -p database > /backup/db-$(date +%Y%m%d).sql
tar -czf /backup/storage-$(date +%Y%m%d).tar.gz storage/app/public