Currently I'm working on small project that require me to host my laravel app on shared hosting (please ignore the reason why I didn't use VPS to host my laravel project) and this hosting provider disable escapeshellarg() for security reason so I can't use php artisan config:cache
to clear config cache.
Is there any workaround for this?
To clear all Laravel's cache, just run the following command: $ php artisan optimize:clear Compiled views cleared! Application cache cleared! Route cache cleared!
Run php artisan config:cache in terminal of your project root directory. First try to get access of terminal on from hosting provider. Then run php artisan config:cache command in your project root directory. If you don't have terminal access the follow this trick.
config:clear
command just deletes bootstrap/cache/config.php
file, so just delete this file manually.
You can call artisan commands programmatically
Artisan::call('config:clear');
This can be helpful in setups where the PHP user has a different set of permissions than the FTP user (so files created by PHP cannot be deleted via FTP)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With