Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come installare e configurare WP Super Cache per i principianti

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

State cercando un modo per impostare WP Super Cache sul vostro sito web WordPress?

I motori di ricerca come Google considerano la velocità del sito un fattore di ranking importante. WP Super Cache può rendere il vostro sito più veloce, aumentarne la SEO e migliorare l’esperienza utente dei visitatori del sito web.

In questo articolo vi mostreremo come installare e configurare WP Super Cache sul vostro sito web.

How to Install and Setup WP Super Cache

Cos’è WP Super Cache e perché si dovrebbe usare?

WP Super Cache è uno dei più popolari e migliori plugin per la cache di WordPress. È un plugin gratuito e ha oltre 2 milioni di installazioni attive.

WP Super Cache crea una copia di ogni pagina del sito sotto forma di file HTML statico. In questo modo, ogni volta che qualcuno visita il vostro sito, gli viene servita rapidamente la versione copiata, invece di generare l’intero sito web da zero.

Di conseguenza, la velocità e le prestazioni del sito WordPress migliorano notevolmente. Il plugin per la cache salta molti passaggi dietro le quinte per garantire che i visitatori non debbano aspettare l’apertura della pagina.

Con un sito web che si carica velocemente, è possibile ottenere un aumento della SEO di WordPress e del posizionamento sui motori di ricerca. Google dà un vantaggio significativo ai siti web più veloci, poiché utilizza la velocità del sito web come fattore di ranking.

Inoltre, migliorerete anche l’esperienza dei visitatori del vostro sito web. Un sito che si carica rapidamente incoraggia le persone a visitarlo più spesso. In questo modo, si ottiene un maggiore coinvolgimento e conversioni, poiché gli utenti trascorrono più tempo sulle pagine.

Ora, siete pronti ad impostare WP Super Cache sul vostro sito web? Scopriamolo.

Impostazione di WP Super Cache – in modo semplice

La prima cosa da fare è installare e attivare il plugin WP Super Cache sul vostro sito web. Per maggiori dettagli, potete seguire la nostra guida su come installare un plugin di WordPress.

Al momento dell’attivazione, WP Super Cache vi informerà che al momento la cache non è abilitata sul vostro sito web.

Per abilitare la cache, andare su Impostazioni ” WP Super Cache. Nella scheda Facile, fate clic sull’opzione “Cache on”. Una volta fatto questo, fate clic sul pulsante “Aggiorna stato”.

Enable caching in WP Super Cache

Dopo aver attivato la cache, è necessario scendere fino alla sezione Cache Tester.

A questo punto, fate clic sul pulsante “Test Cache” per verificare se funziona.

Test the cache

WP Super Cache recupera il sito WordPress due volte e confronta i timestamp delle due pagine. Se i due timestamp corrispondono, significa che la cache è in corso di elaborazione sul sito.

Configurazione avanzata di WP Super Cache

WP Super Cache è un potente plugin per WordPress dotato di molte opzioni avanzate. Queste opzioni possono migliorare ulteriormente le prestazioni del sito e fornire un maggiore controllo sulle modalità di memorizzazione nella cache del plugin.

Abilita la cache

Per impostare WP Super Cache con opzioni avanzate, andare alla scheda “Avanzate” del plugin WP Super Cache. Quindi, fate clic sul checkbox “Abilita cache”.

WP Super Cache advanced settings

Sotto la cache, si trovano le opzioni per “Metodo di consegna della cache”. Si consiglia di utilizzare l’opzione “Semplice” se si è alle prime armi e non si ha familiarità con la modifica dei file del server.

Abilitazione della compressione in WP Super Cache

La compressione permette a WP Super Cache di servire i file nella cache come file compressi, migliorando così il tempo di caricamento. Questi file sono più piccoli e possono essere scaricati dai browser più rapidamente.

Per abilitare la compressione, scorrere verso il basso fino alla sezione “Varie” e selezionare la casella “Comprimi le pagine, in modo che vengano servite più rapidamente ai visitatori”.

Miscellaneous advanced cache settings

Abilitazione della cache dinamica

Se si desidera mantenere alcune parti di una pagina web dinamiche durante la cache, WP Super Cache offre un’opzione in tal senso.

Per abilitare l’opzione, si può andare nella sezione “Avanzate” e fare clic sul checkbox “Abilita la cache dinamica”.

Enable dynamic caching

L’abilitazione della cache dinamica è utile in alcune situazioni, soprattutto se le pagine contengono contenuti che cambiano frequentemente. Ad esempio, è possibile velocizzare le pagine che contengono annunci pubblicitari consentendo la cache dinamica.

Impostazione del tempo di scadenza e della garbage collection

WP Super Cache consente di impostare la scadenza e la frequenza di eliminazione delle pagine in cache dal server.

Per iniziare, è sufficiente scendere fino alla sezione “Tempo di scadenza e Garbage Collection” nella scheda Avanzate per configurarla.

Set up Expiry time and garbage collection

Il “Timeout della cache” indica al plugin di rimuovere la pagina memorizzata nella cache ed eseguire una nuova cache. Il plugin lo imposta a 1800 secondi in modo predefinito, il che è ottimo per un sito web ad alto traffico.

Tuttavia, se il sito web è nuovo e non riceve molto traffico, 3600 secondi sono un buon punto di partenza.

Oltre a questo, è possibile programmare un orario in cui il plugin controlla la presenza di file obsoleti nella cache e li rimuove.

Specificare le pagine che non si desidera vengano memorizzate nella cache

Per impostazione predefinita, il plugin memorizza nella cache tutte le pagine del sito. Questo può aumentare le dimensioni dei file della cache e consumare più risorse. Tuttavia, WP Super Cache consente di aggiungere le pagine che non si desidera vengano memorizzate nella cache.

Per iniziare, è possibile scorrere verso il basso fino alla sezione “Stringhe URL rifiutate” nella scheda Avanzate. Nel boxed, inserire le stringhe URL delle pagine che non si desidera che il plugin metta in cache.

Ad esempio, se avete un negozio di e-commerce, potete escludere le pagine che i visitatori non visitano spesso e salvare le risorse del server. Ad esempio, la pagina di pagamento, la pagina dell’account e la pagina di ringraziamento.

Add page URLs to remove from caching

Al termine, non dimenticate di fare clic sul pulsante “Salva stringhe”.

Impostazione della CDN con WP Super Cache

La maggior parte dei siti web di contenuto serve molti file statici per ogni richiesta di pagina.

Questo include file JavaScript, immagini, fogli di stile e altro ancora. A differenza degli articoli di WordPress, che sono generati dinamicamente da PHP, questi file possono essere serviti utilizzando un servizio di Content Delivery Network (CDN).

Un CDN è un network o una rete di server distribuiti geograficamente che aiutano a distribuire rapidamente i contenuti ai visitatori. Per maggiori dettagli, selezionate la nostra infografica sul perché avete bisogno di un CDN.

Nota: l’impostazione di una CDN con WP Super Cache è un po’ tecnica e richiede una certa esperienza con le CDN. Se preferite un metodo più semplice, CloudFlare è un provider CDN gratuito facile da impostare. Consultate il nostro tutorial su come impostare il CDN gratuito di CloudFlare sul vostro sito WordPress.

Per impostare il CDN con WP Super Cache, fare clic sulla scheda CDN e selezionare l’opzione “Abilita supporto CDN”.

Inserite ora il vostro URL offsite, che sarà l’URL della vostra pull zone. Una pull zone indica al CDN dove trovare i file e come servirli agli utenti. Ad esempio, si può inserire quanto segue: https: //cdn.wpbeginner.com

Enable CDN support

Nel campo CNAME aggiuntivi, inserire altri CNAME creati per la zona pull. Ad esempio, http://cdn1.wpbeginner.com, http://cdn2.wpbeginner.com, http://cdn3.wpbeginner.com.

Le altre impostazioni possono essere lasciate come predefinite. Infine, selezionate la casella “Salta gli URL https per evitare errori di “contenuto misto”” e salvate le modifiche.

Click the skip HTTPS URLs option

Ora il sito web è pronto per servire contenuti statici da un CDN.

Servire un sito statico con WP Super Cache

La modalità di precarica di WP Super Cache consente di creare file statici in super cache per tutti gli articoli e le pagine e di servire un sito web statico. In questo modo, i contenuti si caricheranno rapidamente ogni volta che qualcuno visiterà il vostro sito.

Un file statico in super cache aiuta a conservare le risorse del server, a servire un vecchio sito che non viene più aggiornato e a migliorare la velocità del sito servendo solo contenuti statici.

Per iniziare, si deve andare alla scheda “Precarica” del plugin WP Super Cache. Quindi, è possibile impostare l’ora di ricarica dei file della cache precarica.

Di default, il plugin lo imposta a 600 minuti, ma è possibile diminuire il tempo se si pubblicano più articoli al giorno.

Ricordate che il precaricamento dell’intero sito WordPress richiede un certo tempo e consuma molte risorse sul server. Si può lasciare a 0 se non si vuole che i file statici scadano mai, a meno che non si ricarichi manualmente la cache.

Preload super cache file

Successivamente, assicurarsi di aver selezionato la casella “Modalità di precarica (garbage collection disabilitata. Consigliata)”. È anche possibile abilitare il precaricamento per i diversi tag, categorie e altre tassonomie presenti sul sito web.

Il plugin offre anche un’opzione per ricevere avvisi via email ogni volta che i file vengono ricaricati. Di default, viene utilizzata l’impostazione “No email”, ma è possibile modificarla scegliendo un’opzione dal menu a discesa.

Al termine, salvare le impostazioni e fare clic sul pulsante “Precarica la cache ora”.

Guide di esperti sulla cache di WordPress

Ora che sapete come impostare WP Super Cache, potreste voler vedere altri articoli relativi alla cache di WordPress.

Speriamo che questa guida vi abbia aiutato a impostare WP Super Cache sul vostro blog WordPress. Potreste anche consultare la nostra guida su come spostare un sito WordPress da HTTP a HTTPS o la nostra scelta dei migliori fornitori di hosting per velocizzare il vostro sito.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

108 commentiLascia una risposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Anze says

    Hey; I have a question – so preload mode enabled does not deletes old cached files – but does that means then when preloaded files are refreshed, the old ones are deleted and replaced, or does it just adding files, which would mean space on server would eventually run out?

    • WPBeginner Support says

      When the page is preloaded a new time, the old preloaded version would be deleted and replaced.

      Admin

  3. Mike Royden says

    Plug in installed, but can’t get past this;

    Permalink Structure Error
    A custom url or permalink structure is required for this plugin to work correctly. Please go to the Permalinks Options Page to configure your permalinks.

    I have gone to the Permalinks Options Page to configure your permalinks, but can’t see where I’m going wrong. Going round in circles, please help. Thanks

    • WPBeginner Support says

      You would want to ensure your permalinks are not set to plain for that error. We recommend using the Post name structure.

      Admin

  4. Katherine says

    I’m trying to set up this plug in to get the best results, and I’m not tech-savvy at all. Your Wp advanced cache set up section is not the same as the current plugin advanced options.

    • WPBeginner Support says

      Thank you for letting us know, we will be sure to take a look into this and update our article when able.

      Admin

  5. Simon says

    I was able to speed up my homepage significantly but unfortunately it only worked for the homepage. The subpages like i.e. ‘Services’ are still really slow.
    What could be the problem?

  6. Rainey says

    Unable to activate the plugin. I get a warning message that a .php file already exists and I should manually delete it before using the plugin. Since I am not a techie I do not know where to go to delete the file. If you could put language in your update to the tutorial to guide us would be really helpful.

  7. Paul says

    This post is dated. When will this post be updated? Would like to know the current status of WP Super Cache?

    • WPBeginner Support says

      Thank you for letting us know, we do not have a specific date that content will be updated but we will take a look into updating this article

      Admin

  8. ShoaiB says

    Thank you for this Awesome Guide.

    I’m using WP Super Cache (Version 1.7.0 ). In the above tutorial, many features are not included. plz, Update Post.

  9. Christopher says

    not as easy as described…

    A custom url or permalink structure is required for this plugin to work correctly. Please go to the Permalinks Options Page to configure your permalinks.

    • WPBeginner Support says

      Thank you for reminding us of that, we’ll be sure to look into updating the article for clarification.

      Admin

  10. Ana says

    Hello Support! :)

    Thank you for all your work, I’m a complete newbie and without you, I don’t know how I’d manage.

    I’m confused as regards what off-site URLs and CNames are, so I’m unable to fill in that in the form. Do I have to refer to somewhere on my page to find out or do I just create it my indicating something?
    Just in case it affects somehow I’d like to inform that I run a multisite.

    Thank you so much & hope you can help me,

    Ana

    • WPBeginner Support says

      Hi Ana,

      The off site URL is the URL of your CDN location and CNames are different pullzones you have created on your CDN server. If you are not using a CDN, then you don’t need to make any changes to these settings.

      Admin

  11. krishna says

    can i use this plugin for testing in localhost ??
    i installed this plugin in localhost and in “Cache Contents” nothing cached
    displaying this …

    WP-Cache (0KB)
    0 Cached Pages
    0 Expired Pages
    WP-Super-Cache (0KB)
    0 Cached Pages
    0 Expired Pages

    is it because i can’t use cache plugin in localhost or some other issue ?

  12. Hardik says

    There is nothing called MOD_REWRITE. Everything from that step seems completely different. Please update the tutorial.

  13. Mike says

    No matter what settings I use Pingdom still gives me an F and says “The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:” and I see and “expiration not specified” message in the details. Am I missing a setting?

  14. Akshay says

    Hi Team ,

    Thanks for the amazing article .

    I have installed WP Super Cache with cloudflare (newbie blogger).
    Can you please help me, how can I integrate cloudflare with WP super cache .

    I did not found any articles or vidoes for the same .

    I thought of installing WP Total , but it has not releasedthe update for recent wordpress version 4.8.1

    Thank You

  15. Sumaiya says

    Hi, I wanted to speed up my site. I used this guide and customized the settings as you shown. But before installing this plugin I tested my site speed it was 4.20 sec. But after installing I check it was 6.78 sec. Why is it like this? please guide me well.

  16. Rajeev jaiswal says

    hello sir, I’m trying to integrate js and CSS code elements in twenty-seventeen WordPress theme. I use enqueue methods but it does not work, so suggest me to all about.

  17. Sara says

    I just downloaded WP Super Cache and the “Advanced” Page doesn’t have the same setup (or some of the same options!) as your screenshot and instructions. Are those dates, or did I somehow end up with an older version of the plugin?

  18. Abner says

    Hi guys – Thanks for sharing this. I am using wp super cache and my wordpress is 4.0.1. At first, i don’t have any problem. Until recently, having a problem. My post did not appear on my website. I tried to put the caching off and my post appear. After that, I put the caching on again. My workaround was after posting article to my website, I will put my caching off to appear the post in my website, then after a few minutes, I will put the caching to on.
    Few weeks doing that, and now, when I put the caching on, my post will disappear again to my website. As of now, my caching is still off.
    Thanks and hope you can help me.

  19. Mark Layton says

    Hello Support,

    Thank You for your help with this issue while trying to install WP Super Cache.
    Here is a copy of issue :

    Warning! Could not update /var/www/website/wp-config.php! WPCACHEHOME must be set in config file.

    Warning! /var/www/website/wp-content/advanced-cache.php does not exist or cannot be updated.

    1. If it already exists, please delete the file first.
    2. Make /var/www/website/wp-content writable using the chmod command through your ftp or server software. (chmod 777 /var/www/website/wp-content) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)
    3. Refresh this page to update /var/www/website/wp-content/advanced-cache.php
    If that doesn’t work, make sure the file /var/www/website/wp-content/advanced-cache.php doesn’t exist:
    1. Open /var/www/website/wp-content/plugins/wp-super-cache/advanced-cache.php$wp_cache_file in a text editor.
    2. Change the text CACHEHOME to /var/www/website/wp-content/plugins/wp-super-cache/
    3. Save the file and copy it to /var/www/website/wp-content/advanced-cache.php and refresh this page.
    Cannot continue… fix previous problems and retry.

    Already use your Envira Gallery and WP Forms and those are fantastic.
    Should I just use W3 Total Cache instead?

    Thank You so much for your help.
    Mark Layton

  20. sheikave Jhurreea says

    Initially my website was loading for under 8 seconds which is pretty bad. But using your tutorial I was able get 90/100 for desktop performance.

    But the mobile platform it remained 74/100. Could you suggest some resources where I could look up too or what is your suggestion.

Rispondi a Sumaiya Annulla risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.