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

Como instalar e configurar o WP Super Cache para iniciantes

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Você está procurando uma maneira de configurar o WP Super Cache em seu site WordPress?

Mecanismos de pesquisa como o Google agora consideram a velocidade do site como um importante fator de classificação. O WP Super Cache pode acelerar a execução do seu site, impulsionar o SEO do site e melhorar a experiência do usuário dos visitantes do site.

Neste artigo, mostraremos como instalar e configurar o WP Super Cache em seu site.

How to Install and Setup WP Super Cache

O que é o WP Super Cache e por que você deve usá-lo?

O WP Super Cache é um dos mais populares e melhores plug-ins de cache do WordPress. É um plugin gratuito e tem mais de 2 milhões de instalações ativas.

O WP Super Cache faz uma cópia de cada página do seu site na forma de um arquivo HTML estático. Dessa forma, sempre que alguém visitar seu site, a versão copiada será exibida rapidamente, em vez de gerar o site inteiro do zero.

Como resultado, a velocidade e o desempenho de seu site WordPress melhoram drasticamente. O plug-in de cache pula várias etapas nos bastidores para garantir que os visitantes não precisem esperar a abertura da página.

Com um site de carregamento rápido, você pode ver um aumento no SEO do WordPress e nas classificações dos mecanismos de pesquisa. O Google dá uma vantagem significativa a sites mais rápidos, pois usa a velocidade do site como um fator de classificação.

Além disso, você também melhorará a experiência dos visitantes do seu site. Um site que carrega rapidamente incentiva as pessoas a visitá-lo com mais frequência. Dessa forma, você obtém mais engajamento e conversões, pois os usuários passam mais tempo nas páginas.

Agora, você está pronto para configurar o WP Super Cache em seu site? Vamos descobrir.

Configuração do WP Super Cache – a maneira mais fácil

A primeira coisa que você precisa fazer é instalar e ativar o plug-in WP Super Cache em seu site. Para obter mais detalhes, você pode seguir nosso guia sobre como instalar um plug-in do WordPress.

Após a ativação, o WP Super Cache o notificará de que o cache não está ativado em seu site no momento.

Para ativar o cache, vá para Configurações ” WP Super Cache. Em seguida, na guia Easy (Fácil), clique na opção “Caching On” (Cache ativado). Depois de fazer isso, clique no botão “Update Status” (Atualizar status).

Enable caching in WP Super Cache

Depois de ativar o cache, você precisará rolar para baixo até a seção Cache Tester (Testador de cache).

Uma vez lá, você deve clicar no botão “Test Cache” para verificar se está funcionando.

Test the cache

O WP Super Cache buscará seu site WordPress duas vezes e comparará os registros de data e hora das duas páginas. Se os dois carimbos de data/hora forem iguais, isso significa que o cache está funcionando no seu site agora.

Configuração avançada do WP Super Cache

O WP Super Cache é um poderoso plug-in para WordPress que vem com muitas opções avançadas. Essas opções podem melhorar ainda mais o desempenho do seu site e fornecer mais controle sobre como o plug-in armazenará seu site em cache.

Ativar o cache

Para configurar o WP Super Cache com opções avançadas, vá para a guia “Advanced” (Avançado) no plug-in WP Super Cache. Em seguida, clique na caixa de seleção “Enable Caching” (Ativar cache).

WP Super Cache advanced settings

Abaixo do cache, você verá opções para “Método de entrega de cache”. Recomendamos usar a opção “Simple” se você for iniciante e não estiver familiarizado com a edição dos arquivos do servidor.

Ativar a compactação no WP Super Cache

A compactação permite que o WP Super Cache forneça arquivos em cache como arquivos compactados, o que melhora o tempo de carregamento. Esses arquivos são menores e podem ser baixados pelos navegadores mais rapidamente.

Para ativar a compactação, role para baixo até a seção “Diversos” e marque a caixa que diz “Compactar páginas, para que elas sejam servidas mais rapidamente aos visitantes”.

Miscellaneous advanced cache settings

Ativar o cache dinâmico

Se você quiser manter certas partes de uma página da Web dinâmicas durante o armazenamento em cache, o WP Super Cache oferece uma opção para isso.

Para ativar a opção, vá até a seção “Advanced” (Avançado) e clique na caixa de seleção “Enable dynamic caching” (Ativar cache dinâmico).

Enable dynamic caching

A ativação do cache dinâmico é útil em determinadas situações, especialmente se você tiver páginas com conteúdo que muda com frequência. Por exemplo, você pode acelerar as páginas que contêm anúncios permitindo o armazenamento em cache dinâmico.

Configurar tempo de expiração e coleta de lixo

O WP Super Cache permite que você configure o tempo de expiração e a frequência de exclusão de páginas em cache do seu servidor.

Para começar, basta rolar para baixo até a seção “Expiry Time & Garbage Collection” (Tempo de expiração e coleta de lixo) na guia Advanced (Avançado) para configurá-lo.

Set up Expiry time and garbage collection

O “Cache Timeout” informa ao plug-in para remover a página em cache e executar um novo cache. O plug-in o definirá como 1800 segundos por padrão, o que é ótimo para um site de alto tráfego.

No entanto, se você tiver um site novo que não recebe muito tráfego, 3600 segundos é um bom ponto de partida.

Além disso, você pode programar um horário para que o plug-in verifique se há arquivos em cache obsoletos e os remova.

Especifique as páginas que você não quer que sejam armazenadas em cache

Por padrão, o plug-in armazenará em cache todas as páginas do seu site. Isso pode aumentar o tamanho de seus arquivos de cache e usar mais recursos. No entanto, o WP Super Cache permite que você adicione páginas que não deseja que sejam armazenadas em cache.

Você pode rolar para baixo até a seção “Rejected URL Strings” (Cadeias de URL rejeitadas) na guia Advanced (Avançado) para começar. Na caixa de texto, digite a cadeia de URLs das páginas que você não deseja que o plug-in armazene em cache.

Por exemplo, se você tiver uma loja de comércio eletrônico, poderá excluir páginas que os visitantes não visitam com frequência e economizar recursos do servidor. Essas podem ser a página de checkout, a página da conta e a página de agradecimento.

Add page URLs to remove from caching

Quando terminar, não se esqueça de clicar no botão “Save Strings”.

Configuração de CDN com o WP Super Cache

A maioria dos sites de conteúdo fornece muitos arquivos estáticos em cada solicitação de página.

Isso inclui arquivos JavaScript, imagens, folhas de estilo e muito mais. Ao contrário das postagens do WordPress, que são geradas dinamicamente pelo PHP, esses arquivos podem ser fornecidos usando um serviço de CDN (Content Delivery Network).

Uma CDN é uma rede de servidores distribuídos geograficamente que ajudam a fornecer conteúdo rapidamente aos seus visitantes. Para obter mais detalhes, confira nosso infográfico sobre por que você precisa de uma CDN.

Observação: a configuração de uma CDN com o WP Super Cache é um pouco técnica e requer alguma experiência com CDNs. Se você preferir um método mais fácil, o CloudFlare é um provedor de CDN gratuito que é fácil de configurar. Veja nosso tutorial sobre como configurar a CDN gratuita da CloudFlare em seu site WordPress.

Para configurar a CDN com o WP Super Cache, clique na guia CDN e marque a caixa ao lado da opção “Enable CDN Support” (Ativar suporte à CDN).

Agora, insira seu URL externo, que será o URL da sua zona de extração. Uma pull zone informa à CDN onde encontrar seus arquivos e como fornecê-los aos seus usuários. Por exemplo, você pode digitar o seguinte: https://cdn.wpbeginner.com

Enable CDN support

No campo Additional CNAMEs, insira outros CNAMEs que você criou para sua pull zone. Por exemplo, http://cdn1.wpbeginner.com, http://cdn2.wpbeginner.com, http://cdn3.wpbeginner.com.

Você pode deixar as outras configurações como padrão. Por fim, marque a caixa que diz “Ignorar URLs https para evitar erros de “conteúdo misto”” e salve as alterações.

Click the skip HTTPS URLs option

Agora seu site está pronto para servir conteúdo estático de uma CDN.

Servir um site estático com o WP Super Cache

O modo de pré-carregamento no WP Super Cache permite que você crie arquivos estáticos de supercache para todas as suas postagens e páginas e sirva um site estático. Dessa forma, seu conteúdo será carregado rapidamente sempre que alguém visitar seu site.

Um arquivo estático de supercache ajuda a conservar os recursos do servidor, servir um site antigo que não está mais sendo atualizado e melhorar a velocidade do site servindo somente conteúdo estático.

Para começar, vá até a guia “Preload” (Pré-carregamento) no plug-in WP Super Cache. Em seguida, você pode definir o tempo para atualizar os arquivos de cache de pré-carregamento.

Por padrão, o plug-in o definirá para 600 minutos, mas você pode diminuir o tempo se publicar vários artigos todos os dias.

Lembre-se de que o pré-carregamento de todo o site WordPress leva algum tempo e consome muitos recursos em seu servidor. Você pode deixá-lo em 0 se não quiser que seus arquivos estáticos expirem nunca, a menos que você atualize manualmente o cache.

Preload super cache file

Depois disso, certifique-se de marcar as caixas para “Modo de pré-carregamento (coleta de lixo desativada. Recomendado)”. Você também pode ativar pré-carregamentos para diferentes tags, categorias e outras taxonomias em seu site.

O plug-in também oferece uma opção para receber alertas por e-mail sempre que seus arquivos forem atualizados. Por padrão, ele usará a configuração “No Email”, mas você pode alterá-la escolhendo uma opção no menu suspenso.

Quando terminar, salve suas configurações e clique no botão “Preload Cache Now”.

Guias especializados sobre o cache do WordPress

Agora que você já sabe como configurar o WP Super Cache, talvez queira ver alguns outros artigos relacionados ao cache do WordPress.

Esperamos que este guia tenha ajudado você a configurar o WP Super Cache em seu blog WordPress. Talvez você também queira ver nosso guia sobre como mover um site WordPress de HTTP para HTTPS ou nossa escolha especializada dos melhores provedores de hospedagem para acelerar seu site.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

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.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

108 ComentáriosDeixe uma resposta

  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.

      Administrador

  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

  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.

      Administrador

  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.

    • 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

      Administrador

  7. 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.

  8. 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.

      Administrador

  9. 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.

      Administrador

  10. 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 ?

  11. Hardik says

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

  12. 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?

  13. 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

  14. 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.

  15. 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.

  16. 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?

  17. 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.

  18. 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

  19. 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.

  20. Greg says

    Hi, I’d like to know whether your guidance to choose mod_rewrite to serve cache files still stands as opposed to using PHP or Legacy Caching. I notice since you published your article, WP Super Cache have changed their own recommendation from mod_rewrite to PHP.

    Thanks in advance!

    Greg

  21. Dillon says

    Hi there. I’ve followed this tutorial to a T, and for the most part, everything works correctly, but I’m having two problems. First, when I make changes, they don’t appear on the site if I’m logged in. If I log out, they appear just fine. Second, I’m working on a WPMU network, and I only have the plugin installed on one site. But it’s caching the other sites on the network as well. How do I stop it from doing that? Thanks!

  22. Sarah says

    Hi,
    I followed your steps because my site was taking over 5s to load but after setting up the WP Super Cache my site wouldn’t load. At all. It was basic HTML – no content, no pictures, just the header…
    So, I guess I’m wondering if there’s a laymen’s guide to literally all the terms you use cause I don’t understand websites or programming and I have a website for a start-up NGO so can’t really pay for any help at this point.
    Or maybe you could direct me somewhere that will help me understand all this better? I’m a complete novice and confused easily!
    Help!

  23. Pedro Moreira says

    Hello,

    I have a “conceptual doubt” about WP Super Cache, that I didn´t see answered neither in your site neither in other sites.

    The question is: the structure of my site is finished. In basic terms, it is mainly a site of videos of football, which means that from this day on I will gradually add posts (that include the videos that I refered) and pages (of the teams).

    Since that this will be a long and permanent process, I need right now to speed up my site because nowadays is very slow.

    My doubt is: when I install and configue this plugin, what does that mean in terms of the updates that I will do in my site (post and pages that I add)?

    I mean, if I cache the site today and tomorrow I add a new page or post, what do I have to do in order that these pages or posts will be also cached? – do I just have to require an update of the plugin? If so, how do I do that, is it possible to define that the plugin will update the cache for example once a week?

    Thank you!

    Best regards.

  24. Herman says

    I’m getting an error on the first step where you need to click on caching on and update. You mentioned the following in your article:
    “WP Super Cache will fetch your WordPress site twice and will compare the time stamps of both pages. If the both time stamps match then this means that caching is working on your site now.”

    This is the place where I get the error. I get a message that says:
    Fetching to prime cache: OK

    Fetching first copy of FAILED

    Fetching second copy of : FAILED

    I would be glad if you could help me out.

  25. Teddy says

    My site is a coupon site, so code is included on the coupon so it prints out by itself without lots of other junk that is on the page. If I use WP Super Cache, will that code be lost because it’s now a static page? Will people still be able to click on the coupon to print just the coupon?

  26. Alex says

    Thanks so much for the the help. Do i have to create a cname record to use the CDN service in WP super cache. Thanks

  27. Stefan Andonov says

    Hi,
    How to preload for several languages, I am using qtranslate, that seems impossible, right?
    10x
    Stefan

  28. John Johnson says

    This is an ecommerce site using Exchange from iThemes. With WP Super Cache activated certain pages that need to be refreshed don’t get refreshed i.e. Empty Cart. When you Empty Cart it comes back with the same content or in other words it appears unemptied.
    When I deactivate WP Super Cache the problem disappears. It was suggested that I Whitelist the pages that shouldn’t be cached. I am uncertain about how to do that. Any help would be appreciated.
    Regards,
    John

  29. Dajuan says

    WP Beginner Staff, when a theme update is applied, or when other plugin updates are made, is WP Super Cache alerted to create new cached versions? Or does the plugin wait until “Expiry Time & Garbage Collection” or a manual cache deletion?

  30. Iosif says

    Hello,

    I am using WP Super Cache, but it seems that my images don’t get cached. Any ideas on how to configure this?

    I did have a lazy load plug-in, but it conflicted with my theme, so I deactivated it…

  31. shubhendu says

    I have just install wp super cache plugin by reading your article but nor js,css and image is not loading at my blog…plz help my site address is

    If you dont want to publish is comment because i include my site link PLEASE reply to my email id.

    Thanks.

  32. madhavi jha says

    hi , i am regular reader of your site , i have setup WP Super Cache plugin as you guide in your blog , but its not working its show only 20/100

    please guide me ,i have been tried to solve this problem since last 2 days , please guide me .

  33. nitai roy says

    Hi,

    I followed as you mentioned here. Everything has done perfectly but I could not find this option: “Enable Compression in WP Super Cache:”
    Where is it please?

    Also, Now how can I know whether it is working perfectly or not?

    Thank you very much.

  34. kurakaniz says

    after updating the plugin it says “.htaccess file may need to be moved” and this error too

    A difference between the rules in your .htaccess file and the plugin rewrite rules has been found. This could be simple whitespace differences but you should compare the rules in the file with those below as soon as possible. Click the ’Update Mod_Rewrite Rules’ button to update the rules.

    what to do please help

  35. stephen says

    I installed everything just as you said but I am still getting 52sec load time and if I tried using gtmetrix I get an error saying the URL does not appear to be an HTML.home page . please help site is

  36. Megan Good says

    This article was very helpful, and I was able to troubleshoot my issues based on your suggested settings. Thank you for the info!

  37. Omprakash Jaiswal says

    wp super cache does not work
    Permlink 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.

  38. Hammad says

    Thank you for your suggestions, I’m trying to apply these settings on my website now. Can you please advise if wp super cache supports minify settings.

    I had wp3 total cache and had a score of 97/81 on gtmetrix, after installing wp super cache my score decreased to 82/68.

  39. Imran says

    Was looking for some great guide for super cache plugin. Now I will try it on my test site.
    Thanks for such a nice tutorial

  40. efiga says

    Hi
    i have a little question , when using this plugin to cashe pages , the google adsense ads will be cashed too ? ,it will show the same ads ?
    thank you in advance

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.