Pre-Deployment Checklist
Before deploying Ecom to production, ensure you have completed these critical steps:Server Requirements
Minimum Server Specifications
CPU
2+ cores recommended
RAM
4GB minimum, 8GB+ recommended
Storage
20GB minimum, SSD recommended
Bandwidth
Unmetered or high allowance
Software Requirements
Required Software:
- PHP 8.0.2 or higher
- MySQL 5.7+ or PostgreSQL 9.6+
- Nginx or Apache web server
- Composer
- Redis (recommended)
- Supervisor (for queue workers)
- SSL certificate (Let’s Encrypt recommended)
Required PHP Extensions
Fromcomposer.json:7, ensure these extensions are installed:
- OpenSSL, PDO, Mbstring, Tokenizer
- XML, Ctype, JSON, BCMath
- Fileinfo, GD (for image processing)
Deployment Methods
Method 1: Manual Deployment
Install Dependencies
Install PHP dependencies:
The
--no-dev flag excludes development dependencies, and --optimize-autoloader optimizes the autoloader for production.Method 2: Git-Based Deployment
Web Server Configuration
Nginx Configuration
Create Nginx server block/etc/nginx/sites-available/ecom:
Apache Configuration
Create Apache virtual host/etc/apache2/sites-available/ecom.conf:
SSL Certificate Setup
Install SSL certificate using Let’s Encrypt:Queue Workers Setup
Ecom uses queues for background processing. Set up Supervisor to manage queue workers:Scheduled Tasks (Cron)
Set up Laravel’s task scheduler:Performance Optimization
Caching Strategy
Redis Configuration
Update.env for Redis:
.env
OPcache Configuration
Enable OPcache inphp.ini:
Monitoring & Logging
Application Logs
Logs are stored instorage/logs/laravel.log. Monitor them:
Error Tracking
Consider integrating error tracking services:- Sentry
- Bugsnag
- Rollbar
Server Monitoring
Monitor server resources:Backup Strategy
Database Backups
Create automated backup script/var/www/ecom/backup.sh:
Security Hardening
Rollback Procedure
If deployment fails:Post-Deployment Verification
Next Steps
Environment Setup
Review environment configuration
Database Setup
Database optimization tips