Installation Guide
Step 1 — Upload Files
Extract the downloaded ZIP and upload all files to your server. For a clean install at the root of a domain:
public_html/
├── app/
├── bootstrap/
├── config/
├── database/
├── public/ ← point your domain web root here
├── resources/
├── routes/
├── storage/
├── vendor/
└── ...
Important: Your domain / virtual host web root must point to the
public/ subfolder, not the project root.
Step 2 — Install Dependencies
SSH into your server and run:
cd /path/to/viralhub
composer install --no-dev --optimize-autoloader
Step 3 — Create the Database
Create a MySQL database and user via your hosting panel (cPanel / hPanel / phpMyAdmin), then note the database name, username, and password.
Step 4 — Configure Environment
Copy the example environment file and edit it:
cp .env.example .env
nano .env
Set these values at minimum:
APP_URL=https://yourdomain.com
DB_HOST=localhost
DB_DATABASE=your_database_name
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
Step 5 — Generate App Key
php artisan key:generate
Step 6 — Run Migrations & Seed Demo Data
# Migrations only (clean install)
php artisan migrate
# With demo data (recommended for first install)
php artisan migrate --seed
Step 7 — Set Permissions
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
Step 8 — Create Storage Symlink
php artisan storage:link
Step 9 — Configure Web Server
Apache: The included public/.htaccess handles URL rewriting automatically. Make sure mod_rewrite is enabled.
Nginx: Add this to your server block:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Step 10 — Log In
Visit https://yourdomain.com — the seeder creates these default accounts:
| Role | Password | |
|---|---|---|
| Admin | admin@viralhub.com | password |
| User | user@viralhub.com | password |
Go to /admin to access the admin panel. Change the default passwords immediately after login.