N
N
Nataly232021-06-29 17:35:31
WordPress
Nataly23, 2021-06-29 17:35:31

How to clear the cache in WordPress?

Hello! Please help me figure out how to clear the cache in WordPress. Caching plugins are not worth it. Also, it's not the browser, because even when I open the page in another browser for the first time, the changes are still not visible. After a while, the page is usually updated, but each time waiting for a while is not very convenient. Is there any way to solve this problem

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Arsentiev, 2021-06-30
@Nataly23

I'll try to insert my IMHO.
It seems to me that there is no cache in WordPress by default (unless the theme is weird, of course).
But there is such a thing as caching on the browser side in accordance with the hosting and htaccess settings.
In this case, the following problem usually occurs:
a) changes are made in the same css files to show, for example, to the client.
b) the client opens the site and sees the old version, and reset the cache, refresh the page via CTRL + f5, enable incognito or gemorno (especially on mobile devices) or broke. And goondos: "I have not changed anything ...."
in this case, it seems to me the easiest way is:
1) set the minimum cache lifetime in the browser in htaccess (this most often depends on the specific hosting, but you can google and try to set general settings, for example, 5 seconds for css, php, jpg, woff, etc. files). In the search for a lot of information on how to do this, you just need to try and analyze whether it works or not on a particular site and hosting.
2) paradoxically - install a caching plugin, there are also a lot of them.
in this case, a normal plugin, with the right settings, will update the cache itself when the files change (re-generate something like g27aj.css) and these files will already differ from those written in the browser. Naturally, you need not to show cached versions to admins or just clear the cache, not just the browser, but the plugin itself - with its button. And it's usually easier to press the button and update the plugin's cache than to tell the client - they say, try to clear the cache in your iPhone, because at the same time, the nasty Safari also erases history and other useful information)))
3) contact the hoster with a question - it may very well be that they have implemented some kind of cache on the side of the hosting software, for example 10 minutes, in this case the old version of the site will be shown in all browsers all this time, so it is better to check with them.

A
Artem Zolin, 2021-06-29
@artzolin

Ctrl+F5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question