Update Versi
Update Autopost ke versi terbaru tanpa kehilangan data, konfigurasi, atau artikel yang sudah ada.
Sebelum Update
- Download file
autopost-vX.X.X.zipversi terbaru - Pastikan tidak ada proses generate artikel yang sedang berjalan (opsional tapi lebih aman)
Cara Update
Windows (via deploy.bat)
- Rename zip yang baru didownload menjadi
autopost.zip - Taruh di folder yang sama dengan
deploy.bat - Double-click
deploy.bat - Pilih
[2] Update ke versi terbaru di VPS - Masukkan IP VPS dan username
- Tunggu selesai (~3–5 menit)
Mac / Linux (via deploy.sh)
bash
bash deploy.sh updateManual di VPS
Jika sudah SSH ke VPS:
bash
# Upload zip baru ke /root/autopost.zip dulu, lalu:
bash /var/www/autopost/update.shYang Dipreserve Saat Update
Script update.sh otomatis menjaga:
| Yang Dipreserve | Keterangan |
|---|---|
.env | Semua konfigurasi (DB, key, dll) |
storage/ | Upload, log, cache |
| Database | Tidak disentuh sama sekali |
Database di-migrate (tambah tabel/kolom baru jika ada), tapi data lama tidak dihapus.
Proses Update
[ Backup & Maintenance Mode ]
✓ .env dibackup ke /root/autopost-env-backup-20240101-120000
[ Maintenance Mode ON ]
[ Mengekstrak Versi Baru ]
✓ Versi baru diekstrak
[ Merge .env ]
✓ .env tidak ada perubahan key
[ Sync File Aplikasi ]
✓ File disync (storage/ dan .env dipreserve)
[ Update Dependensi PHP ]
[ Rebuild Frontend ]
[ Migrasi Database ]
[ Optimasi ]
[ Hak Akses dan Restart ]
✓ Queue worker direstart
✓ Maintenance Mode OFF
╔══════════════════════════════════════╗
║ Update Berhasil! 🎉 ║
╚══════════════════════════════════════╝Jika Update Gagal
Script otomatis mengembalikan app ke mode online jika terjadi error. File .env backup tersimpan di /root/autopost-env-backup-{tanggal}.
Untuk restore manual:
bash
cp /root/autopost-env-backup-20240101-120000 /var/www/autopost/.env
cd /var/www/autopost && php artisan up