Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to clean Laravel Bootstrap cache config file?

Tags:

I developed laravel app locally and uploaded in shared hosting.

While hosting I changed the database name and username of mysql in the .env and the config/database files.

But in remote its still using the old db name and user which is found in the bootstrap/cache/config file.

So how to clean the bootstrap/cache/config.php file?

like image 572
Abel D Avatar asked Nov 20 '15 09:11

Abel D


People also ask

How do I manually delete laravel cache?

The following is the syntax to clear cache in Laravel is given below: php artisan cache: clear. php artisan config: clear. php artisan cache: clear.

How do I clear the config cache in laravel on a server?

To clear all Laravel's cache, just run the following command: $ php artisan optimize:clear Compiled views cleared! Application cache cleared! Route cache cleared!

Where is laravel config cache?

The cache configuration is located at config/cache. php . In this file you may specify which cache driver you would like used by default throughout your application. Laravel supports popular caching backends like Memcached and Redis out of the box.


1 Answers

If you are trying to clear configuration cache, which it sounds like you are. You need to run:

php artisan config:clear

At some point, you probably ran php artisan config:cache which generated a cached version of your config file, and this file is not cleared with php artisan cache:clear

like image 108
Tommy May Avatar answered Oct 08 '22 09:10

Tommy May