En av våra läsare frågade oss nyligen hur man rensar cacheminnet i WordPress. Detta är det första steget som vi brukar rekommendera vid felsökning av problem på webbplatsen.
Cachelagring spelar en viktig roll för att förbättra webbplatsens prestanda, men det kan ibland hindra dina besökare från att se omedelbara förändringar efter uppdateringar. Detta beror på att din webbläsare, värdserver och cachningsplugins kan servera äldre, cachade versioner av dina sidor.
I den här artikeln visar vi dig hur du rensar cacheminnet i WordPress på rätt sätt. Vi kommer att täcka rensning av webbläsarens cache, webbhotellets cache och de bästa caching-pluginsen för WordPress.
Vad är caching i WordPress?
Lösningar för caching lagrar statiska versioner av din website i ett cacheminne. Detta allow WordPress att hoppa över att runna tyngre PHP-skript varje gång din site laddas.
Processen med caching hjälper till att förbättra WordPress hastighet och prestanda och den övergripande användarupplevelsen.
Här är ett exempel på hur caching-processen gillar att se ut:
Det finns flera olika typer av lösningar för caching tillgängliga för WordPress. Den mest populära metoden är att använda en WordPress caching plugin gillar WP Rocket eller WP Super Cache plugin.
Dessa tillägg ger dig control över vilka filer och media som cachelagras när cachen löper ut, när cachen rensas och mycket mer.
Beroende på din dostawca hostingu kan det hända att du redan har inbyggd WordPress-cachelagring. Till exempel har hanterade WordPress-hostingföretag som SiteGround sina egna cachningslösningar.
Populära WordPress-värdar som Bluehost har också inbyggd cachelagring för sina användare.
Om du använder en web application firewall som Sucuri eller Cloudflare för att förbättra din WordPress-säkerhet, finns det också en cache för att snabba upp din webbplats och minska stilleståndstiden.
Slutligen kommer de flesta moderna web browsers också att lagra cachelagrade versioner av pages på din web browser.
Varför ska du cleara cachen på din website i WordPress?
Ibland inser inte cachen att det har gjorts ändringar på din website i WordPress. Istället för att hämta den nya versionen av din site, kommer du att klistras fast i en gammal version.
Detta förhindrar både you och dina visitors från att se eventuella updates som du har gjort.
Genom att cleara din WordPress-cache säkerställer du att den senaste versionen av din website alltid kommer att vara live.
Med detta sagt, låt oss ta en titt på hur du clearar din cache i WordPress. Använd bara snabblänkarna under för att hoppa direkt till den metod du vill använda:
Video Tutorial
Om du föredrar skriftliga instruktioner är du välkommen att fortsätta Läsa.
Metod 1: Clear Cache i din web browser
Först måste du cleara din web browser cache. De flesta web browsers lagrar statiskt website content som gillar stylesheets, JavaScript, images och andra website filer för att förbättra laddningstiderna.
Men ibland kan web browsers misslyckas med att inse att en page har ändrats. Istället för att hämta en ny kopia, hämtar de sidan från den cachade versionen som finns lagrad i din webbläsare.
För att cleara din webbläsares cache i Google Chrome, click på the menu icon och select sedan More Tools ” Clear Browsing Data.
Detta ger en popup där du kan selecta det content som du vill remove från cachen.
Se till att boxen ”Cached images and file” är kontrollerad och klicka sedan på knappen ”Clear browsing data”.
Nu har du utan problem clearat din webbläsares cache. Du kan besöka din WordPress blogg för att se om den hämtar den nya versionen av din site.
För mer details, see our guide on how to clear your browser cache in all major browsers.
Om du fortfarande inte ser de ändringar du gjort på din website, gå då vidare till de andra metoderna i den här artikeln.
Metod 2: Clear cachen i ditt tillägg för caching i WordPress
Om du använder ett plugin för caching i WordPress på din site, måste du cleara plugin-cachen.
Så här clearar du din cache med några av de mest populära tilläggen för caching i WordPress.
Clear cachen i WP Rocket
WP Rocket är det bästa pluginet för caching i WordPress på marknaden. Det bästa med att använda WP Rocket är att det proaktivt bygger din WordPress-cache i bakgrunden, så att dina användare alltid serveras en cachelagrad version av din site.
Det gör det också mycket enkelt att cleara cachelagrade filer med ett enda click.
Gå bara till Settings ” WP Rocket och klicka på knappen ’Clear Cache’ i adminpanelen för plugin.
Nu kommer WP Rocket att clear alla dina cachelagrade filer åt dig.
Clear Cache i WP Super Cache
WP Super Cache är ett annat populärt plugin för caching i WordPress. Det allow you to clear or purge all cached content with a single click.
Gå bara till Settings ” WP Super Cache i din WordPress dashboard, och klicka sedan på knappen ”Delete Cache” i ”Delete Cached Pages” section.
Nu kommer WP Super Cache att ta bort alla cachelagrade filer från din website.
Clear Cache i W3 Total Cache
W3 Total Cache är ett mycket använt plugin för caching i WordPress. Likes the other plugins above, you can clear all caches with a single click.
Du måste gå till Prestanda ” Dashboard och sedan klicka på knappen ”töm alla cacher”.
Pluginet W3 Total Cache kommer nu att ta bort allt cachelagrat content för din site.
Metod 3: Clear cachen i ditt webbhotell i WordPress
Vissa WordPress hosting providers har built-in caching alternativ för att hjälpa till att påskynda WordPress.
Så här gör du för att cleara webbhotellets cache hos några av de mest populära WordPress -värdarna.
Clear Cache i Bluehost
Bluehost är en av de bästa hosting providers för WordPress och rekommenderas officiellt av WordPress. De har en built-in caching-lösning som omedelbart förbättrar din WordPress prestanda och hämtar snabbare.
Bluehost gör det enkelt att cleara din WordPress-cache från din WordPress admin area.
Logga bara in på din WordPress admin dashboard, och du kommer att se en ”Caching” knapp i admin-verktygsfältet högst upp. Håll hovern över den och klicka sedan på alternativet ”Purge All”.
Bluehost kommer nu att cleara data från din WordPress cache.
Clear Cache i SiteGround
SiteGround är en ledande hosting provider för WordPress som är känd för snabbhet och förstklassig customer support. De erbjuder en built-in lösning för caching för att förbättra din websites prestanda.
Du kan cleara SiteGround-cachen från kontrollpanelen på ditt webbhotell samt från WordPress admin area.
För att cleara din caching från din Siteground-kontrollpanel måste du logga in på din dashboard för webbhotell och gå till Speed ” Caching under site tool section.
Välj sedan alternativet ”Dynamic Cache” i menyn. Klicka sedan på menu iconen bredvid your domain name och select alternativet ’Flush Cache’ från dropdown.
Ett annat sätt du kan hantera din Siteground-cache är med SG Optimizer plugin. Det första du behöver göra är att installera och aktivera pluginet. För mer detaljer, se vår guide om hur du installerar ett plugin för WordPress.
När du har aktiverat måste du klicka på knappen ”Purge SG Cache” i ditt admin-verktygsfält högst upp på WordPress.
Plugin kommer automatiskt att cleara din SiteGround WordPress cache.
Metod 4: Clear cachen för tillägget till din WordPress Firewall
Om du använder en WordPress firewall gillar Sucuri för att skydda din website, då finns det ytterligare ett lager av caching som du måste clear.
Du kan cleara din Sucuri-cache genom att gå till Sucuri ” Firewall (WAF) i din WordPress adminpanel.
Välj sedan alternativet ”Clear Cache” i menyn och klicka på knappen ”Clear Cache”.
Bonustips: Om du senaste har flyttat din WordPress site, kan du också behöva cleara din DNS cache. Detta säkerställer att du får updating DNS-information och får tillgång till den senaste versionen av din webbplats. För mer detaljer, se vår guide om hur du clearar din DNS-cache.
Expertguider om WordPress Cache
Nu när du vet hur du clearar din cache kanske du gillar att se några andra guider relaterade till WordPress cache och caching tillägg:
- Vad är en page caching i WordPress?
- Hur man enkelt fixar Leverage Browser Caching-varning i WordPress
- Bästa tillägg för caching i WordPress för att snabba upp din website
- LiteSpeed Cache vs. WP Rocket – Vilken är bättre?
- Så här installerar och konfigurerar du WP Super Cache för Beginnare
- Hur man installerar och konfigurerar W3 Total Cache för Beginnare
- Så här installerar och konfigurerar du WP Rocket på rätt sätt i WordPress
- Den ultimata guiden för att öka hastigheten och prestandan i WordPress
Vi hoppas att den här artikeln hjälpte dig att lära dig hur du clearar din cache i WordPress. Du kanske också vill se vår guide om hur du skapar ett nyhetsbrev via email och våra expertval för den bästa programvaran för chattsupport för småföretag.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Jiří Vaněk
Perhaps I would also add for people using CDNs like CloudFlare, that caching is also enabled there, and additional ’hidden’ caches might exist on the CDN side. Either a plugin connected to the CDN can clear it, or it needs to be done manually. For instance, in CloudFlare’s dashboard, cache can be cleared in the designated section.
WPBeginner Support
That is a very good point to remember for those using CDNs
Administratör
Sue
This was great content and very helpful – clear and concise, so even I could understand it. I’m completely new to this game with no former experience in website building at all. I don’t know what I would have done without you. Thanks again!
WPBeginner Support
You’re welcome! Glad our content was able to assist
Administratör
Favour
Thanks for this great content. It’s very helpful
WPBeginner Support
Glad you found it helpful!
Administratör
Silas Imoh
The joy in me now is beyond imagination. Before now, When i make changes on my theme in my site, it doesn’t apply…i never knew it was a caching problem. After doing as instructed, My customizations are now live. Thanks alot WP Beginner. Your are the best
WPBeginner Support
Glad our guide was able to help!
Administratör
Jordi
Thanks for this article. Is the Sitemap also removed or changed in any way, when the cache is purged?
Anjoe San Diego
Was frustrated of the header ads on my blog. Thank you for this. It was resolved
WPBeginner Support
Glad our guide could help
Administratör
Ellen
I keep getting a notice from the MonsterInsights plugin in my Site Health that says:
We noticed you’re using a caching plugin or caching from your hosting provider. Be sure to clear the cache to ensure the tracking appears on all pages and posts.
I wasn’t using a caching plugin as far as I knew
WPBeginner Support
You may want to reach out to your hosting provider to ensure there isn’t something on their end for caching that could be part of the issue.
Administratör
Sara
My host support is telling me the following when I asked them to help me clear my sites cache:
”There is no server-side caching on any of our servers, so this message may be caused by one of your installed WordPress plugins that enables some kind of caching.”
My question is therefore how I can locate what plugin that needs clearing. Do you know?
WPBeginner Support
You would want to go under Plugins > Installed Plugins and see if any of your plugins say in their description that they are a caching plugin.
Administratör
Gopal
Hi thanks for the article. I have followed every step mentioned but when i designing home page there in no background overly set by me but when browse that page it showing background image but not when i editing page
WPBeginner Support
You would want to check with the support for your specific theme if clearing the cache is not updating your changes to ensure it is not an issue with the theme itself.
Administratör
Farukh Hussain
Hi,
I have a question please. Do I need to always clear all the cache manually using w3 total cache or any other plugin.. Isn’t it possible to make it automatically clear all cache daily.
WPBeginner Support
The caches should clear over time based on the caching you are using, this guide is how to force it to clear in case there are any issues or something that needs to be displayed that isn’t showing.
Administratör
Vishal soni
I have bluehost in-built cache and now I purge all cache from Wordpress and how to upload new cache memory again? also, do I need another paid cache service like wp rocket? What would be better
WPBeginner Support
If you need another cache would be a question of personal preference. Your site will generate a new cache so you don’t need to worry about uploading a new cache.
Administratör
nadir
does that fix style.css problem
when you make changes to the file the web site dont change at all
WPBeginner Support
If your CSS changes are not appearing then this would be the first step for having those changes appear
Administratör
syed sibtain
sir if i reset my caches or empty my catches my site data will be lost or not??
WPBeginner Support
Your posts and other content will not be lost if you clear your cache
Administratör
Ravi Teja
Some of my website users are facing problem with their browser cache. I am suggesting them to delete the cache, but I can’t do it for everyone.
Is there anything I can do to stop browser caching for some pages on my website?
WPBeginner Support
You would need to check with the support for the caching you are using for what is available.
Administratör
Alvin Alolor
If i clear my cache on my wordpress would it clear cache on other mobile users?
WPBeginner Support
It should clear the cache for your users as well other than their browser cache.
Administratör
Rashed Ali
Can I clear cache from my hosting Cpanel?
Thanks for your help!
WPBeginner Support
It would depend on what caching you’re talking about, if it is caching from your host then you would need to reach out to your hosting provider and they should be able to show you what options are available.
Administratör
Mensah Tenasu
Dear admin please can i do something to get back the caches after is been deleted in case i need it
WPBeginner Support
Sadly not, clearing your cache would remove what is in your cache.
Administratör
David
Thankss for this awsm info..
WPBeginner Support
You’re welcome
Administratör
ron quiring
So if you have caching available (and are using) on WPEngine or Securi firewall, then is your article saying that we should NOT implement a caching plugin on wordpress?
WPBeginner Support
No, you can still use caching on your site with those plugins, this article is to show how you clear the cache if you are having an issue that would require you to clear your cache.
Administratör
kamaraj
If I clear my Wordpress cache, is there any chance for getting lost of existing data.
WPBeginner Support
You shouldn’t lose any of your saved content when clearing the cache on your WordPress site.
Administratör
william
I am having this problem
The site is experiencing technical difficulties.
Only for my homepage please assist me
WPBeginner Support
To start out, you would want to start with our troubleshooting article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Administratör
Nomaan
I have same on my website. i had been tried all of your step but till not getting any kind result. help me
WPBeginner Support
If none of these methods cleared your cache, you would want to reach out to your hosting provider to see if they have any caching that is affecting your site on their end.
Administratör
mark dannau
Hello to all,
Great article. I have a closely related question.
When I edit a page of my website in WP, it strangely shows the code of the cdn’s pull zones, not the original code. How do I get back to the original code?
Thanks for the help, Mark
WPBeginner Support
For that, you would want to check with your CDN to ensure it is properly configured as a likely cause of the problem
Administratör
jamila
Hi , i want to ask if i do clear cache with one of these plugins there any content or design disappear, plz help i want to clear cache and i’m afraid to lost the design and content
WPBeginner Support
Unless you were editing the design and you are clearing your cache to see that update, your design should not be modified.
Administratör
Shein
Hi everyone, it really is a good article….but a question came to my mind. If we face caching problems while building our websites, then how about for visitors to our sites. This may be an insane question, but i am afraid that some of our visitors may not see our updates. Thanks a lot and looking forward an answer from some.
WPBeginner Support
Following the site and server steps should help allow your users to see your changes.
Administratör
Jaroslav Havlicek
Hello, I do everything to clear cache from wordpress, chrome and deleted everything on ftp server. I did a new instalation of wordpress on the same web site, but on the web is the old look of the web. So please, how can i delete old web ?
WPBeginner Support
You would want to reach out to your hosting provider to ensure nothing on their end would be causing the issue.
Administratör
Tom
Hi, I noticed that the Soliloquy slider images are only loading on mobile screens or if I make my browser window way smaller on my desktop screen. I have pretty large images loaded in the slider (1500×1500 px). Is there something I’m missing?
WPBeginner Support
You would want to reach out to Soliloquy and let them know to be able to assist you.
Administratör
Stavros
Hello i have the newspaper theme on word press. My posted views sudently are zero and do not give me the real numbers of visitors. i have over 35.000 uniqs! How can i fix it please?
Verotiana
Thanks for this article. But what if I’m not using any of these WP plugins, yet my page still won’t update…?
Christian Okonkwo
? Can deleting of cash removed my admin login…
Am always afraid that Cashing can delete a database or anything within my host file.
But i need to do it to see some changes.
?I want also know if “database establishing errors” can be cause by cleaning cash.
WPBeginner Support
Hi Christian,
No cache files are temporary files which means they can be deleted without affecting your website’s functionality.
Administratör
Ann
Great Article! I have a question. After updating plugins do I have to clear out all my caches again? Thanks!
WPBeginner Support
Hi Ann,
It is not necessary as most caching plugins are setup to automatically purge cache at regular intervals. However, you can also go ahead and manually clear cache if you find something missing.
Administratör
Nick
Thank you for the helpful post! Clearing my browser cache fixed issues for me, but Is it correct to say that any repeat visitors to my site could run into issues from not clearing their own browser cache? I would like to universally clear cache so that it’s dummy proof and doesn’t require my users to go in and fix it themselves. Is that possible in any way?
Yusuf Bitrus
Thanks for this awesome suggestions and listings, I think super cache one the best cache plugin I have ever used.
And it is working like a .
I love it
Neal Umphred
Thanks for your useful article! What does the CLEAR CACHE button on the Publish menu in the WordPress admin section do?
Alex
It amazes me that most important question has been ignored. How to clear cache saved in other peoples’ browsers? I.E. people who visit you wordpress website and maybe have no idea how to clear icache or that they need to do it. Thousands of plugins but not one which would add some version parameter to all website urls therefore forcing browsers to request them as new files.
Sachin Singhi
I have also been looking for a way to do the same. Have realised that if we do not enable the cache at all it will work but impact the performance of the website.
Rohan
Hi, how do I clear cache if I don’t have a cache plugin – taken over a community group site and presumably previous webmaster used then deleted a cache plugin without clearing the cache first?!
Esther Roche
Hi!
I use Fastest Cache and I was wondering what is the difference between
CLEAR CACHE OF THIS PAGE
DELETE CACHE
DELETE CACHE AND MINIFIED CCS/JS
Can you tell me please?
Thanks in advance and thanks for this post!
Esther
WPBeginner Support
Hi Esther,
Clear cache of this page, removes the cached files for the page you are currently viewing. Delete cache, deletes cached files and the last deletes everything including minified CSS/JS.
Administratör
Esther Roche
So,
when I make changes in a specific page and someone else can’t see them, I should just use ”clear the cache” of that page; but if I make changes to a couple of pages or more, I should either clear cache of each separately or use ”delete cache”, which would let them see the changes in the whole site. Is this right?
Thanks again for your patience!
WPBeginner Support
Hi Esther,
Most caching plugins will automatically clear the cache for a page when you make changes those pages. You will only need to use those features if you are working on your website’s theme or adding some new plugin and those changes are not showing up on your website.
Cherisa
When I try to install WP Super Cache, I get the message that says ”Plugin not allowed on our system due to performance, security, or compatibility concerns. Contact support with any questions”. But at the bottom there’s a check to tell me that it is ”compatible with your version of wordpress”. This is the same with W3 Total Cache. What is wrong?
WPBeginner Support
Hi Cherisa,
Some WordPress hosting companies block caching plugins because they have their own caching installed on their servers. Please contact your hosting provider to confirm.
Administratör
Andy
Similar problem here. Nothing happens when you click on my menu on mobile devices.
Any help is appreciated.
Thank you!
kandra
Damn just what I need.
I feel so stupid that I had people from my web host just to clear this mess.
Anyway,
how you set this website gone from comment form. this is awesome. I want to have things like this in my blog pencaricerah.com.
Do you have the tutorial? Are you using the default comment form 7?
Melch Wanga
Not using a plugin but my CSS changes are not showing in Chrome until the cache is cleared. How do I ensure that my website visitors get the new styling without asking them to clear their browser’s cache.
NB: Its only on Chrome.
Thanks.
Group Of Oceninfo
Looking for the same answer, Whenever making change in CSS it’s not showing till hard refresh and it’s not suggestible to ask visitor to do hard refresh. So, How we can serve new css changes to the visitors? How to clear all the cookies/browser cache file.
As of now I am using W3 Total Cache plugin, Even after clicking on Performance > Dashboard > Empty All Caches it’s not showing new changes until hard refresh. Can you please suggest some good method for wordpress? I am not using any version css version number as well as GT Matrix suggesting to remove query string I have removed using function.php
Waiting for some positive feedback.
Masoud
thank you for this. but
i am not using a cache plugin,
and i only enabled wordpress built in cache ,
i placed this code into my wp-config.php
/* WordPress Cache */
define( ’WP_CACHE’, true );
define(’ENABLE_CACHE’, true);
define(’CACHE_EXPIRATION_TIME’, 360000);
would you mind pleaseee tell , how to flush this cache please ?
Jamie
I do not have a plugin installed, but I am having trouble. If I install one now, after the fact, will that help?
Rohan chowdhury
Dear Admin I want you to post some tutorial regarding advertisement on website for beginners who have less tariffs in their site.
By the way I love your work.
WPBeginner Support
Hi Rohan,
Thanks for the feedback. We will try to cover it more in future. Meanwhile, have you checked our guides on optimizing Adsense revenue in WordPress and best Ad management plugins for WordPress?
Administratör
RUSHEEK
This is very useful and nice articles.
Towfiq
It would be great if you could show how to clear the cookie of another 2 popular browsers: Firefox & Safari.
Gaurav Khurana
Thanks but how frequently which should clear caches . Also would be better if you can mention sequence of caches to be clear. So we can take note of it point by point
Jeremy
Good read. Didn’t know about the Sucuri caching. Also, recommending adding a tip for the browser cache. CTRL + SHIFT + R usually works just as well by forcing a refresh that bypasses cache and keeps you having to dump your browser cache, every time.
Dan Kapellen
This is a valuable article. I learned much about the role of cache, how to optimize its use and maintenance measures. Thank you.