This guide helps you migrate your Laravel project to a PHP 8 compatible environment using a subdomain safely and efficiently.
Create a new subdomain (e.g., php8.example.com
) and point its document root to your Laravel application directory. This allows isolated testing without affecting the live site.
Copy all files from the live Laravel project to the new subdomain directory. Make sure file ownership and permissions are maintained.
Rename the existing vendor
folder to vendor_backup
as a rollback option in case of compatibility issues.
Download and extract the compatible vendor package:
Download Vendor ZIPPlace the new vendor folder into your Laravel root. Set the PHP version to 8.0 in the subdomain configuration.
Ensure correct write permissions for Laravel cache and logs:
chmod -R 775 storage/framework
chmod -R 775 storage/logs
chmod -R 775 bootstrap/cache
Access php8.example.com
in your browser. Fix any errors, warnings, or deprecated functions based on PHP 8 compatibility. Test all major functions.
If everything works, send the new URL to the Flash development team and request a new Flash build using the new base URL.
Hand over the new build to the QA team. Use tools like Fiddler or HTTP Toolkit to test requests. Debug issues using Laravel logs (storage/logs/laravel.log
).
Once the new PHP 8 version is stable and bug-free, pass it to the client for final testing via Sreelekshmi (CRM).