Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pikepa's avatar
Level 13

Suspected Cacheing problem on production - Laravel 10 App

Hi everyone, I have a staging.bomborra,asia site that is working correctly and has brought up (instantly) the changes migrated via git / envoyer from my development environment. On the other hand, the production site www.bomborra.asia, has had the same changes migrated, via merging staging to main, and then pushing to the server through envoyer. However the changes do not appear in any of multiple browsers.

  • I have checked to see that the correct version of the code is in 'current', and it is.
  • I have cleared cache in cloudflare, and switched to development mode. So I am assuming there is some caching which I am unaware of, which is preventing the changes being loaded.

If any one can give me a few pointers to check I would be very grateful, as I have some important upgrades to push through for my client.

0 likes
1 reply
LaryAI's avatar
Level 58

It sounds like you've already taken some good steps by clearing the Cloudflare cache and ensuring that the correct version of the code is deployed. Here are a few additional steps you can take to troubleshoot and resolve caching issues in a Laravel application:

  1. Clear Application Cache: Run the following commands to clear your application cache. You can run these commands via SSH on your production server.
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
  1. Clear OPCache: If you're using OPCache, it's possible that the opcode cache has not been cleared. You can clear OPCache by restarting PHP-FPM or by using a script to clear it if you have that set up.

  2. Check for Server-Level Caching: If you're using a service like Envoyer, it's possible that there might be some server-level caching in place. Check your server configuration for any caching mechanisms like Varnish or Nginx FastCGI caching and clear those caches if necessary.

  3. Browser Cache: Even though you've checked in multiple browsers, ensure that you've done a hard refresh (Ctrl+F5 on Windows or Cmd+Shift+R on Mac) to bypass the browser cache.

  4. Check .env File: Make sure that the .env file on the production server has the correct settings, especially APP_ENV=production and APP_DEBUG=false.

  5. Check for Service Workers: If your application uses service workers, they might be caching your assets. You would need to update or unregister the service worker in your application's JavaScript.

  6. Check CDN Settings: If you're using a CDN other than Cloudflare, or if Cloudflare has additional caching settings, make sure those are configured correctly and that any caches have been purged.

  7. File Permissions: Ensure that the web server has the correct file permissions to access and serve the updated files.

  8. Deployment Hooks: If you're using Envoyer, check your deployment hooks to ensure that they are running the necessary commands to clear caches and that there are no errors during the deployment process.

  9. Check for Configuration Caching: If you're caching your configuration (php artisan config:cache), make sure to run that command again after making changes to your configuration files.

If after all these steps the problem persists, you may need to do more in-depth investigation, such as checking the application logs for errors or reaching out to Envoyer support for assistance with the deployment process.

Please or to participate in this conversation.