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

brainiachades's avatar

laravel app shows white blank page on Artisan cache:clear or config:clear command

My laravel app is working quite well but I noticed the mail config is not using the value from ENV so I ran artisan config:clear. Then, when I reload, the website shows a blank white page. Please as this is urgent.

This are what I have tried so far but still not working:

  • Check for whitespace in ENV value (found none)
  • Run artisan config:cache, config:clear, view:clear, route:clear and even clear
  • Delete cache files in bootstrap cache folder manually

I need help urgently, anyone experienced this before?

0 likes
3 replies
LaryAI's avatar
Level 58

This issue could be caused by a variety of factors, but one possible solution is to check the Laravel log files for any errors that may have occurred during the config:clear command. To do this, navigate to the storage/logs directory and open the most recent log file. Look for any error messages that may indicate the cause of the blank white page.

Another possible solution is to try running the composer dump-autoload command to regenerate the autoload files. This can sometimes resolve issues with missing or outdated class files.

If neither of these solutions work, it may be necessary to debug the issue further by checking the server error logs or using a debugging tool like Xdebug.

// Example code for running composer dump-autoload
composer dump-autoload
hupp's avatar

@brainiachades Try the below command with or without sudo as per your need.

sudo php artisan view:clear && sudo php artisan config:clear && sudo php artisan route:clear && sudo php artisan cache:clear
sudo chown -R $USER:www-data storage && sudo chown -R $USER:www-data bootstrap/cache && sudo chmod -R 775 storage && sudo chmod -R 775 bootstrap/cache

for Linux, you can assign folder permission for the user to storage folders.

brainiachades's avatar

Thanks for the help, I have been able to solve it.

  • My website was hosted on a shared hosting and I was running artisan command through route.
  • Later I was able to use ssh access to run artisan command and turns out that it returns an error which prevent the command from running.
  • The error was that each time I save and write value to env file, there was a break line between my APPNAME.
  • Since the artisan command didn't run when I hit the clear route, the cache config does not clear thereby returns the already cached data when trying to send mail.

Please or to participate in this conversation.