Complete your Laravel project's initial setup with one click!
- ✅ Application Key generation
- ✅ Storage Link setup
- ✅ Database Migration execution
- ✅ Cache Optimization (config, route, view)
- ✅ Security Lock (single-run)
- ✅ Professional HTML Output
- ✅ Detailed Error Reporting
# Upload file to public/ directory
public/install.phphttps://domain.com/install.php
rm public/install.phpThe script runs these Artisan commands in order:
php artisan key:generate # 1. Application key
php artisan storage:link # 2. Storage link
php artisan migrate --force # 3. Database migrations
php artisan config:cache # 4. Config cache
php artisan route:cache # 5. Route cache
php artisan view:cache # 6. View cacheinstall.lock file and won't run again.
- Script should only be used during installation
- Must be deleted after installation
- Should be added to .gitignore in production
- File permissions should be checked (644)
- PHP 8.0+
- Laravel 9.0+
- Composer dependencies must be installed
.envfile must be configured- Database connection must be ready
✅ Should be used:
- When setting up a new Laravel project
- During first deploy to server
- When running a cloned project for the first time
❌ Should not be used:
- For updates (use
update.phpinstead) - Repeatedly during development
- On already installed production systems
# Install Composer dependencies
composer install --no-dev --optimize-autoloader# Fix directory permissions
chmod -R 755 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache# Check .env file
nano .env
# Verify database credentials
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_passwordWhen the script runs, you'll see professional HTML output:
- 🔵 Blue step headings
- ✅ Green success messages
⚠️ Orange warnings- ❌ Red error messages
| Script | Purpose | Usage |
|---|---|---|
| install.php | Initial installation | New project |
| update.php | Update + Migration | After deploy |
| clear-cache.php | Cache clearing | Development |
| refresh-cache.php | Cache refresh | Production |
This script is freely available under the MIT license.
Feel free to open issues for bug reports and suggestions!