==================================================== SureCommerce - UPDATE GUIDE ==================================================== HOW TO UPDATE TO A NEW VERSION =============================== IMPORTANT: Always backup before updating! ----------------------------------------- 1. BACKUP YOUR DATA ================ a) Backup Database: - Via phpMyAdmin: Export → SQL format - Via command line: mysqldump -u username -p database_name > backup.sql b) Backup Files: - Backup .env file - Backup public/uploads folder - Backup storage folder (optional - logs) 2. DOWNLOAD NEW VERSION ==================== - Download the latest version from CodeCanyon - Extract the new files 3. UPDATE FILES ============ a) DO NOT overwrite these files/folders: - .env - public/uploads/ - storage/logs/ b) Overwrite all other files with new version c) Or use these commands: # Backup important files first cp .env .env.backup cp -r public/uploads public/uploads.backup # Extract new version over existing files # Then restore backed up files cp .env.backup .env cp -r public/uploads.backup/* public/uploads/ 4. UPDATE DEPENDENCIES =================== Run these commands in order: composer install --optimize-autoloader --no-dev php artisan migrate php artisan cache:clear php artisan config:clear php artisan view:clear php artisan route:clear 5. RESTART QUEUE WORKERS (Production Only) ======================================== IMPORTANT: Always restart queue workers after update! If using Supervisord: sudo supervisorctl restart surecommerce-worker:* If using systemd: sudo systemctl restart surecommerce-worker 6. VERIFY THE UPDATE ================== ✓ Check version in Admin Panel → About/System Info ✓ Test core functionality ✓ Check error logs: storage/logs/laravel.log ✓ Test queue jobs are processing ✓ Clear browser cache if frontend looks broken TROUBLESHOOTING UPDATE ISSUES: ============================== Issue: White screen after update Solution: - Check file permissions: chmod -R 755 storage bootstrap/cache - Check .env file is correct - Check logs: tail -f storage/logs/laravel.log - Run: php artisan config:clear Issue: Database errors after update Solution: - Run: php artisan migrate - Check database credentials in .env - Restore database backup if needed Issue: Features not working / Old code running Solution: - Clear all caches: php artisan optimize:clear - Restart queue workers (critical!) - Restart web server - Clear browser cache Issue: Permission denied errors Solution: - Fix permissions: chmod -R 755 storage bootstrap/cache chmod -R 755 public/uploads - Change owner to web server user: chown -R www-data:www-data storage bootstrap/cache public/uploads ROLLBACK PROCEDURE: =================== If update fails and you need to rollback: 1. Restore backed up files 2. Restore database backup: mysql -u username -p database_name < backup.sql 3. Clear all caches 4. Restart queue workers 5. Contact support for assistance UPDATE CHECKLIST: ================= □ Backup database □ Backup .env file □ Backup public/uploads folder □ Download new version □ Extract files (preserve .env and uploads) □ Run: composer install □ Run: php artisan migrate □ Clear all caches □ Restart queue workers □ Test application □ Check error logs --- AUTOMATIC UPDATE (Future Feature): =================================== Future versions may include one-click update functionality through the Admin Panel. Check changelog for availability. --- For update support, please contact through your CodeCanyon account with: - Current version number - New version number - Error messages from logs - PHP version © 2026 DreamTeam