Laravel 5.3 - Clear config cache in shared hosting
Solution 1
config:clear
command just deletes bootstrap/cache/config.php
file, so just delete this file manually.
Solution 2
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)
Solution 3
Try also
for command line
php artisan config:cache
using artisan commands
\Artisan::call('config:clear');
https://www.tutsmake.com/laravel-clear-cache-using-artisan-command-cli/
Solution 4
try this command for clear all cached data at once.
php artisan optimize:clear
Wahyu Handy
Updated on October 30, 2021Comments
-
Wahyu Handy over 2 years
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?