🚀 Cara Mengetes Website Menggunakan XAMPP
✨ Apa itu XAMPP? XAMPP adalah software gratis yang menggabungkan Apache, MySQL/MariaDB, PHP, dan Perl. Dengan XAMPP, kamu bisa menjalankan website lokal di komputer sebelum mengupload ke hosting!
📥 Download XAMPP
Pilih sesuai OS:
- Windows
- Linux
- MacOS
-
Install XAMPP
Download file instalasi dari link di atas, lalu install seperti biasa. -
Buka XAMPP Control Panel
JalankanXAMPP Control Panel
, lalu klik Start pada:- Apache (untuk server web)
- MySQL (jika butuh database)
-
Salin Folder Website ke htdocs
- Pergi ke folder instalasi XAMPP ➔
htdocs
- Buat folder baru, misalnya
projectku
- Salin semua file website kamu ke folder tersebut.
- Pergi ke folder instalasi XAMPP ➔
-
Akses Website via Browser
Buka browser favorit kamu dan ketik:http://localhost/projectku
-
(Opsional) Setup Database
Jika websitenya butuh database:- Buka
http://localhost/phpmyadmin
- Buat database baru sesuai konfigurasi project kamu.
- Import file
.sql
yang sudah tersedia.
- Buka
Saat XAMPP sudah berjalan dan project diakses, contoh tampilan akan muncul seperti ini:
- Pastikan tidak ada aplikasi lain yang memakai port 80 dan 443 (seperti Skype, IIS).
- Kalau Apache tidak jalan, coba Run as Administrator saat membuka XAMPP.
- Pastikan file project kamu tidak error (cek error_log jika ada masalah).
- Gunakan folder name tanpa spasi di dalam
htdocs
. - Cek
error_log
di folderxampp/apache/logs
untuk debug error.
📌 Note: Ini hanya untuk development lokal/localhost. Untuk live production server, rekomendasinya beda ya!