0

I'm trying to deploy my laravel app to a cPanel Shared Hosting. Here is the app and system features:

  • Laravel: 8
  • PHP: 8.1

I've done these steps:

  • Changed .env file as like that:
    APP_URL=http://example.com/
    APP_LOG_FILE=/home/example/example/storage/logs/laravel.log
        
    DB_DATABASE=dbname
    DB_USERNAME=user
    DB_PASSWORD='pass'
  • I pointed out my url to /home/example/example/public folder.
  • I've cleared all caches and regenerated app key on my local. And I uploaded the files.
  • Removed storage folder in the public folder.
  • Followed the steps suggested here.

When try to access, it throws this error: enter image description here

I can't understand what's the problem.

Thanks.

sundowatch
  • 3,012
  • 3
  • 38
  • 66

1 Answers1

2

This issue might occur due to change in APP_KEY value in your .env file.

APP_KEY is used for secure data transmission and Laravel recommends to do that by setting it to a random string.

You can run this command:

php artisan key:generate
php artisan config:cache
php artisan route:cache
php artisan view:cache
Amri
  • 77
  • 8