Laravel 5.3 - Clear config cache in shared hosting

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)


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/