Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ilex01's avatar

blade file does not refresh

When I upload a blade file to the live server with the FTP, it's not updated.

I've tried: composer update composer dumpautoload

I've tried: php artisan cache:clear php artisan config:clear php artisan view:clear php artisan route:cache

If you use PhpStorm, uncheck Preserve files timestamps deployment option:

I've deleted the cached views in storage/framework/views.

I've cleared all browsing data from chrome. I've tried incognito on Chrome.

I've deleted and uploaded the file again.

I've tried: 3 differents ftp.

0 likes
31 replies
johnDoe220's avatar

what you mean (live server)?you meqn is vps or host?

2 likes
ilex01's avatar

Even if the blade file is deleted, it's still shown.

1 like
vincent15000's avatar

Why only clear ?

Have you tried this ?

php artisan config:cache
php artisan route:cache
php artisan view:cache
1 like
ilex01's avatar

@vincent15000 Thank you for your help but it doesn't work. I've deleted the file, and I can still access it on the browser.

1 like
ilex01's avatar

@Laralex Thank you for your help but it doesn't work. I've deleted the file, and I can still access it on the browser.

1 like
jlrdw's avatar

Sure you have the right file and folder and project, clearing browser cache should take care of it. Delete browser cache as well.

2 likes
ilex01's avatar

@jlrdw I've deleted the browser cache and still doesn't work.

1 like
Snapey's avatar

Sounds like either

a) you are uploading to the wrong place / looking at the wrong place

b) you have caching enabled externally, eg such as Cloudflare

c) the file you are uploading is not being used by the route you are accessing

2 likes
ilex01's avatar

@Snapey HI, I'm uploading to the right place. I've reset opcache. The route is correct.

Snapey's avatar

@ilex01 clearly there is something obvious that you are missing.

If using FPM, make sure you restart it.

1 like
ilex01's avatar

@Snapey Thank you for your help but I've restarted FPM and it doens't work.

ilex01's avatar

I've updated laravel to 9.18.0 (latest version) and it still doesn't refresh the cache.

ilex01's avatar

I use my application on a VPS hosted by PlanetHoster.

Sinnbeck's avatar

Is it only blade files or does the same happen for other files as well?

Can you try deleting all files except .gitignore from /storage/framework/views

2 likes
ilex01's avatar

@Sinnbeck The problem occurs only with the blade files. If I upload a file directly in public_html, then, it's displayed without a problem.

I've deleted the files from /storage/framework/views and it doesn't help.

Should I delete the files from:

/storage/framework/cache /storage/framework/sessions /storage/framework/testing as well?

Thank you for your help.

Sinnbeck's avatar

@ilex01 shouldnt be necessary. Can you try setting the controller to return a different view?

1 like
Sinnbeck's avatar

@ilex01 redirect? I meant change view('my-broken-view') -> view('some-other-view')

And can you show the code for the the view() ?

2 likes
ilex01's avatar

@Sinnbeck I use a redirection at the bottom of the controller. That is to say: return redirect('/dl2');. I've no code for the view dl2.blade.php, it's deleted or renamed to something different but still shown in the browser under /dl2.

jlrdw's avatar

@ilex01 replace the view with only a hello world, then try. As I said many replies above I think somehow it's being replaced at wrong location (folder). Otherwise you have something cached somewhere.

1 like
ilex01's avatar

@jlrdw I already tried hello world, I even deleted the dl2.blade.php file and it was still shown. I finally get rid of the problem by changing the route to another URL. See my answer below.

ilex01's avatar
ilex01
OP
Best Answer
Level 5

Changing the route from :

Route::get('/dl2', function () {
    return view('dl2');
});

to:

Route::get('/dl7', function () {
    return view('dl2');
});

and changing in the controller:

return redirect('/dl2');

to

return redirect('/dl7');

solved the problem.

1 like
Joeszeto's avatar

Maybe it cache from nginx or something like Cloudflare ?

1 like

Please or to participate in this conversation.