How to completely uninstall the cache plugins in WordPress • WordPress Help

You already know that cache plugins are essential for WordPress but just like install them is easy, uninstall them It is not completely so, and if you do it wrong your site is broken, at all .

It is quite common that, when you uninstall a cache plugin, to install another or use another cache system, you have problems with your website, sometimes having an error 500, which leaves your site totally invisible .

This is because caching plugins are not usually uninstalled completely they have that ugly custom and they just delete the plugin folder, leaving trash for several parts of your installation .

As not all cache plugins are installed the same let's see how to completely uninstall free cache plugins most popular .

How to uninstall completely WP Super Cache

Despite its popularity, this Automattic cache plugin sometimes does not make a clean install after uninstall it and delete it from your plugins screen.

Although is the one that is best uninstalled when you deactivate and erase the plugin, it does not always get it then I always recommend that you verify that you have done it Well .

The list of plugin modifications that you must review to uninstall it completely if they existed after uninstalling it and deleting it is the following:

  • Delete the file / wp-content / ] advanced-cache.php
  • Delete the file /wp-content/wp-cache-config.php
  • Borrain in the .htaccess file of your server everything from #BEGIN WPSuperCache through #END WPSuperCache both lines included
  • Delete in the file wp-config.php the line that says define ('WP_CACHE', true); // Added by WP-Cache Manager
  • Delete in the file wp-config.php the line that says define ('WPCACHEHOME', '/ home / optimal5 / public_html / wp-content / plugins / wp-super-cache / '); // Added by WP-Cache Manager
  • Delete the folder / wp-content / cache /
  • Delete the folder / wp-content / plugins / wp-super-cache / [19659136] You may not find anything or you may find it all, I already tell you that is the one that best behaves when you uninstall it, but always check .

    It does not matter if you had it active in basic mode or advanced, check the list always after deactivating it and deleting it.

    In the best case you will only find the lines #BEGIN WPSuperCache and #END WPSuperCache in the .htaccess file , with nothing between them, but delete them equally.

    How to uninstall completely W3 Total Cache

    This " intense " plugin contains hundreds of configurations, and not what I almost never recommend because it requires very wide knowledge of server operation, cache files and their settings s, but there are many people who try it … and then uninstall it after being overwhelmed with its settings.

    And of course, then has the ugly habit of uninstalling pretty badly leave all your WordPress installation full of orphan folders, files and codes .

    It will not always be this way, and in the last versions has improved a lot, but it's worth never to check it .

    The list of changes to check and delete if you find them is the following:

    • Delete the file /wp-content/advanced-cache.php
    • Borra the file / wp-content / object-cache.php [19659014] Delete the file /wp-content/db.php
    • Borra in the file .htaccess of your server everything from # BEGIN W3TC Browser Cache up to # END W3TC Browser Cache both lines included.
    • Delete in file .htaccess from your server everything from # BEGIN W3TC CDN to # END W3TC CDN both lines included.
    • Delete in file .htaccess from your server everything from # BEGIN W3TC Page Cache core to # END W3TC Page Cache core both lines included.
    • Delete in file wp-config.php lines ** Enable W3 Total Cache * / and
      define ('WP_CACHE', true); // Added by W3 Total Cache
    • Delete the folder / wp-content / cache /
    • Delete the folder / wp-content / w3tc-config /
    • Delete the folder / wp- content / plugins / w3-total-cache /

    How to uninstall completely WP Fastest Cache

    This plugin is being making it very easy to configure and minimized files .

    But is the same as the rest of the cache plugins not to clean all your installation after disable it and erase it.

    First of all, if you activated the minimized HTML and CSS files in your settings, before deactivating the plugin deactivates those options .

    Then deactivates the cache, deactivates and delete the plugin, and follow this list to check that it has been completely uninstalled :

    • Delete in the file vo .htaccess from your server everything from # BEGIN WpFastestCache to # END WpFastestCache both lines included.
    • Delete in file ] .htaccess of your server everything from # BEGIN GzipWpFastestCache to # END GzipWpFastestCache both lines included.
    • Delete in the file .htaccess from your server everything from # BEGIN LBCWpFastestCache to # END LBCWpFastestCache both lines included.
    • Delete the / wp- folder content / cache /
    • Delete the folder / wp-content / plugins / w3-fastest-cache /

    As you will see it does not leave as much crap as others its cache system is based entirely on .htaccess rules .

    Of course, even if you think that e, after deactivating it, it has deleted the lines of .htaccess deletes the orphaned lines that leaves at the beginning.

    How to uninstall completely Comet Cache

    Another very used cache plugin is this, that adds, among other things, the Gzip compression .

    As in the previous ones, after deactivating it and deleting it, it reviews and cleans the following :

    • Deletes the file / wp -content / advanced-cache.php
    • Delete in the file .htaccess of your server everything from # BEGIN Comet Cache to # END Comet Cache both lines included.
    • Delete in the file wp-config.php the line define ('WP_CACHE', true); that it adds in the second line of your WordPress configuration file.
    • Delete the folder / wp-content / cache /
    • Delete the folder / wp-content / plugins / comet-cache /

    This is the most guarrillos, and never deletes the file advanced-cache.php nor the folder / cache / both in / wp-content / .

    How to uninstall WP Rocket completely

    If the cache plugin you use is WP Rocket, without free option , only for payment, the manual uninstall instructions, after deactivating the plugin, are the following:

    • Delete the folders / wp-content / cache / and / wp-content /wp-rocket-config/.
    • Borra the file / wp-content / advanced-cache.php .
    • Edit the file .htaccess and delete everything between the lines #BEGIN WP ROCKET and #END WP ROCKET both included.
    • Edit the file wp-config.php and put the line define ('WP_CACHE', true) in false or delete it, whatever you prefer.
    • In the database of your WordPress delete the table tuprefijodetabla_rocket_settings and all its transient files ( transients ) and cronjobs .

    How to uninstall Cache Enabler completely

    In case your chosen plugin is Cache Enabler and you decide to uninstall it, after deactivating the plugin and deleting it from the WordPress desktop you should check the following in case the plugin has not deleted it, which is usually done, it is quite clean in this regard:

    • Edit the wp-config.php file and delete the line that says define ('WP_CACHE', true); // Added by Cache Enabler or change from true to false.
    • Delete file / wp-content / advanced-cache.php

    Just review, because in my tests I always cleaned both the wp-config.php line and the file advanced-cache.php .

    Is there a clean cache plugin that does not leave any residue?

    The only and best way to apply cache to your WordPress without using files or modifying your web configurations is to use server cache systems .

    If you have your web hosted on SiteGround uninstall any WordPress cache plugin and install its plugin SG Optimizer .

    After activating its server cache systems (static, dynamic and memcached ), both in the plugin and in section Sup cPanel erCacher you will have a faster cache, because is activated on the server and stored in RAM much faster.

    Other hosting companies also have their own strategies and plugins server cache, like WP Engine, though at prices beyond the reach of ordinary mortals, like you and I.

    Loading …

    That may also help:

Cache strategies in WordPress (free webinar)

Tomorrow On September 20, 2017, at from at 6:00 PM, ] will have a new new free SiteGround webinar . This time the subject we will deal with will be will be were the caching strategies to be applied to any WordPress project.

In this webinar we will review we review definitions, keys, techniques, strategies and recommendations related to the implementation and use of caching systems for your web project, and in particular, for your WordPress project.

The cache is one of the most important strategy within WPO that is, improving the performance of our project and optimizing it for better resource management .

] We will tell we have from the basics of start-up, so that you lose your fear, until the most advanced or complex strategies for large projects.

Fernando Pue nte CTO of Chapman's Strategy where manages millions of visits per month, worldwide and in five languages ​​with sites such as SPORTYOU or BASKET4US, who will initially expose tips and tricks to improve the speed and optimization of our web using caching systems .

Later we will open open debate, in which you will be able to make us, Fernando Puente and myself , the questions or doubts that you arise arose for your own WordPress.

Do not delay in signing up you can do it right now in this link , it's totally free.

Here you have the video of the webinar …

Loading …

What are WordPress user caches?

If you have ever worked on a project in which you needed to work with WordPress cookies you have probably had to deal with the function wp_set_auth_cookie . I refer to this function :

It sets the identification cookies based on the user ID.

And when you use this function, you are essentially creating a cookie that is used to identify the user to the access WordPress.

But if you want to know how to automatically identify a user with WordPress then there are a few additional steps required to do it correctly, especially if you use caching plugins.

And there it is where they come into play WordPress user caches .

WordPress user caches

In addition to creating an identification cookie, it is important to make sure you are doing the following:

  • Emptying the user caches,
  • Discarding identification cookies,
  • Defining the current user,
  • Establishing the identification cookie,
  • Updating the ca User ch.

Sounds complicated, does not it? The good part is that there are a few functions (the ones I've linked above) that make it simple.

The most important thing to remember is that you need an instance of WP_User to be able to do all this. How you extract an instance of the user will depend on the functionality of your plugin .

Exactly, you may be able to extract a reference for a user by giving a username :

Or maybe you can use an email address:

Be any be the case, the following steps must have a user if you want to do it well. So, with that said, the code would be something like this :

That's it! Here is the description of what each function does:

  • clean_user_cache . This clears all user information in cache.
  • wp_clear_auth_cookie . When a user is identified with WordPress a cookie is stored. This will empty the identification cookie.
  • wp_set_current_user . Obtained an instance of WP_User, it tells WordPress to mark this user (allowing it to exist in the database)
  • wp_set_auth_cookie . This will create the cookie used to identify the user defined in the previous function.
  • update_user_caches . To finish, this will update the user caches with the information of each year.

When you have to work with user caches in WordPress, identification and also to identify users automatically, you must use these functions.

Loading …

That may also help you:

How to control the Autoptimize cache • WordPress Help

In case you do not know, Autoptimize is a fantastic WordPress plugin with which to minimize your code so serve your pages faster .

But in certain conditions and configurations can generate a very large cache that would take up a lot of space and you'll have to be manually emptying it every so often, which is a pain in the ass .

Why does the Autoptimize cache grow so much?

The size of your site cache goes in direct proportion to the amount of code on your website to all files and HTML codes , CSS and JS to keep minimized for to serve these files from the Autoptimize cache instead of rendering them complete and unimproved at each visit .

And the thing becomes immense, besides , if you activate the settings include the embedded JS and CSS ( inline ).

 JS inline in Autoptimize

 CSS inline in Autoptimize ]

So one way to keep the Autoptimize cache under control is to not activate those two boxes, but only if your cache goes up to a level where the indicator turns red and you get the warning from the cache.

Why does not Autoptimize empty the cache alone?

Good question. The answer is that a very large minimized file cache is a warning that something is not fine as you may be generating too many minimized files, and what you should do is keep them at bay.

it is especially important in very large sites with a lot of content, where there is a lot of HTML, CSS and JS code to be minimized.

The problem of the self-cleaning of the cache would be that many operations to clean the cache and this could slow down your website which is just what we do not want.

On the other hand, if you do not control the size of the cache it will consume a lot of disk space on your server.

So what do I do?

My recommendation is that, in principle, do not do anything . You minimize everything, even the embedded JS and CSS, and if Autoptimize does not warn you, leave it so it is the most optimal configuration to improve loading times for your website .

Also, Autoptimize warns you based on good . You will see the Autoptimize indicator in red, it will show you a notice on the desktop and even send you an email, so for lack of information it will not be.

If it is not very serious, if it does not happen very often , that you go through your WordPress and erase the cache is enough . Simply put the cursor over the icon (green or red according to the size of the cache) of Autoptimize, and clear the cache.

Let's say that the only problem is that you do not you have no space on your server.

Now, if you receive notices of very large cache sizes, say more than 1Gb then it is still better to disable the embedded JS and CSS as we have seen before

But what if you want to have all the minimized settings active but with the cache under control?

If you want to minimize your content while keeping the Autoptimize cache you can force the automatic emptying of your cache, for which you have 2 methods.

Empty the Autoptimize cache with a code

Just add this code to the file functions.php of the topic active or your utility plugin, changing the value maximum of the cache to your liking:

In this example you will see that I have set the automatic deletion when it reaches 1Gb, but adapt it according to the space you have on your server by changing the value after $ myMaxSize .

Empty the Autoptimize cache with a plugin

If you prefer, you can do the same with the BI Clean Cache plugin with which you can set a CRON for that flushes the Autoptimize cache when you decide.

Loading …

That may also help you:

How to fix the "Specify a Cache Validator" warning

Following with the series of articles on WPO there is an optimization failure that we will sometimes have to solve when analyzing the speed from our website: Specify a Cache Validator .

In this section, using the Pingdom Tools for example, you will be shown those resources of your web that you have not specified a cache validation .

What is that Cache Validator?

Okay, I forgot. The first thing is to know what the analyzer is not warning, and it means that if we do not define a cache validation a time in which the content will expire, the browser of our Visitors will download our content on each visit and our web will take longer to be completely displayed.

This is not usually necessary when our website usually shows almost the same content, but if we do not give the appropriate instruction to the visitor's browser, this will download it as if it were the first time the visit .

What can we specify a Cache Validator?

The problem that usually arises with this notice is that we can not always solve it because we can only specify an expiration time of the content for what is hosted on our server, but in many cases the content will not be on our server, since l have no access, we can not "give orders" .

That is why in many cases it is a persistent error, showing a list of external contents (Google maps, tag manager, the JetPack devicepx etc) with which we can not do (almost) nothing in this regard.

How do I fix that from Specify to Cache Validator?

Well , therefore taking into account the above, open your file .htaccess and add the following:

You only have to save the changes.

Loading …

You may also find it helpful:

Serious and urgent vulnerability in W3 Total Cache

Today a serious vulnerability was detected in the famous W3 Total Cache plugin which may compromise the security of your website

To make matters worse it turns out that the plugin has not been updated for more than 6 months and without even giving premium support, something unacceptable in such an important plugin, with millions of active users. [19659003] The vulnerability detected, according to explained in Zerial has a vulnerability of type XSS (Cross-Site Scripting) that allows to obtain administrator credentials.

To be able to exploit the vulnerability the administrator or a user with enough permissions must have an active session, the problem is in the "Support" section. When generating a support ticket, the system displays a form in which it assigns an "ID" as a hidden field. This value can be overwritten by setting the value via GET.

In this way, it is possible to exploit the vulnerability by injecting a payload of type "> .

 w3totalcache_xss-vulnerability "width =" 838 "height =" 446 "srcset =" 840w, https: // 550w, 768w, 882w "sizes =" (max-width: 838px) 100vw, 838px "/> </p>
<h2><span id= Solutions to the vulnerability of W3 Total Cache

If you can do without the W3 Total Cache plugin I recommend you use another plugin that offers similar features For example, if you are hosted on SiteGround you can use 9022] SuperCacher which manages static cache, dynamic and memcached in a single click.

What you should not be leave your web without cache never.

] And if you do not want to stop using W3 Total Cache then it is urgent that you apply this guide to solve the problem as long as there is not a plugin update that solves the serious security problems:

  1. First of all do a backup of your WordPress .
  2. Save the W3 Total Cache settings and export the settings from the general plugin settings
  3. You can now deactivate your W3 Total Cache plugins administration page, but without deleting it or clicking on the uninstall link of the plugin.
  4. Now access the files of your WordPress installation and rename from cPanel or FTP to the folder wp-total- cache and change the name, for example to wp-total -cache-off Do not erase the folder, just rename it or WordPress will show all kinds of object cache, configuration and dependent plugins or Dropins errors. But mainly because for the next steps we need to continue there.
  5. Now you must download the version or fork created by M. Asif Rahman which solves the problem of W3 Total Cache and save it to your computer:
    Direct download :
  6. Go back to your desktop WordPress, go to the page to add plugins and choose to upload new plugin.
  7. Locate the file recently downloaded from Github, upload and activate it.
  8. With the plugin already active visit the performance tab (Performance) and we will make some adjustments (see one by one):
    1. Go to Performance -> General Settings, check all settings and save.
    2. Go to Performance -> Dashboard, clear the cache.
  9. Go back to your site and see if everything is fine, and if you're sure, of course.

Summing up

Run! One of two, either you use another cache plugin or apply the patch as soon as possible. This type of vulnerabilities are exploited quickly, because they affect millions of users and there will always be some bastard willing to take advantage of it.

I recommend you look for another plugin, especially due to the lack of updates and support by W3 Total Cache

Note : On September 26 the plugin was updated after months without new features (finally) to correct the vulnerability: -cache / changelog /

Loading …

may also help you:

Errors Leverage Browser Caching browser WordPress

When you check the speed of your website with tools like GTMetrix, Pingom, Google PageSpeed ​​or Think with Google is quite common see a notice on Leverage Browser Caching errors, with a list of elements that cause such errors usually scripts.

If you do not know how to fix these errors, and consequently, speed up your web, let's see what they are and how they are solved.

What is the error warning of Leverage Browser Caching?

 think-with-google-leverage-browser-cache "width =" 838 "height =" 519 "srcset =" 840w, https: // ayudawp .com / wp-content / uploads / 2016/09 / think-with-google-leverage-browser-cache-550x340.png 550w, with-google-leverage-bro wser-cache-768x475.png 768w, 1000w "sizes =" (max-width: 838px) 100vw, 838px "/> </a> </p>
<p> The notice of <a href= leverage browser caching refers to the cache of your browser and that is every time visits a website downloads a lot of resources, such as images, HTML, CSS and JavaScript in the local cache of your browser .

The idea, good, is that you will not have to download them again to display them every time reload that page.

The error of Leverage Browser Caching what comes to tell you is that your server, or another, does not include the correct HTTP headers or that even if they are not well configured because the cache time is too short.

Solutions to the errors of Leverage Browser Caching in WordPress

 gtmetrix-lever age-browser-cache "width =" 838 "height =" 209 "srcset =" 840w, 550w, /09/gtmetrix-leverage-browser-cache-1-768x191.png 768w, 639w , 845w "sizes =" (max-width: 838px) 100vw, 838px "/> </a> </p>
<p> Depending on the results of the errors you will notice that there are several things to solve. </p>
<p> The most common errors are usually misconfigured servers, which are easy to solve, but on the other hand there are those that leave us frozen , like the <strong> errors by scripts of Google Analytics or of other scripts that we believe essential </strong>in addition to some surprise sa more. </p>
<p> In any case it is always instructive <strong> to analyze the errors of <em> Leverage Browser Caching </em></strong>so let's see the most common and their solutions. </p>
<h3><span id= Leverage Browser Caching on the server

 leverage-browser-caching-own-server "width =" 838 "height =" 384 "srcset =" server-own-840x385.png 840w, 550w, wp-content / uploads / 2016/09 / leverage-browser-caching-server-own-768x352.png 768w, -propio.png 1261w "sizes =" (max-width: 838px) 100vw, 838px "/> </a> </p>
<p> As I said, the most common are the errors caused by elements hosted on your server, and they are usually referred to that the expiration has not been defined. </p>
<p> You should know that the time to cache content usually two methods are used mainly: <a href= Cache-Control headers and Expires headers .

Cache-Control works in the client's cache and establishes the resource of the age maximum of the resources, while Expires header is used to specify a specific point in time from which the resource will no longer be valid.

Needless to say (or not) that there is no need to add both headers, since it would be redundant. Cache-Control is a newer method and is usually the recommended method, although there are performance analysis tools, such as GTMetrix which still check the Expires Headers .

 leverage-browser-caching "width =" 688 "height =" 387 "srcset =" jpg 688w, 550w "sizes =" (max-width: 688px) 100vw, 688px "/> [19659004] So we have to learn how to add these headers to your server, of course, the codes that we are going to see are examples, that you should not copy as such, but decide on what types of files, expiration times, etc. adjust to your web. </p>
<p><strong> Important </strong>: Of course, before modifying the file <code> config </code> of Nginx or <code> .htaccess </code> of Apache make a backup copy of it, just in case. Also, if you do not know if your server works with Ngix or Apache, check the hosting configuration or ask your provider. </p>
<h4><span id= Adding the Cache-Control header in Nginx

Add the following, adapted to your needs, to the file config of Ngix of your server:

To use Expires in Nginx add the following to your ] config :

Adding Cache-Control headers in Apache

In this case we add them to the file .htaccess from your server:

] Also, we added it to the file .htaccess :

To check the headers, and make sure everything is fine, you can use the development tools or your browser's inspector, or taking a look again at your favorite speed analysis tool.

Leverage Browser Caching and Google Analytics

The other most common error in Leverage Browser Caching is usually Go ogle Analytics.

I know, it sounds almost like a joke that you are seeing how optimized your website is in PageSpeed ​​ from Google and that it is precisely THE tool from Google that generates errors and optimization problems of your website .

But the question is can it be fixed? After all, you want to know, and Google too, who visits you, what you do, how often, etc.

Well the only solution is to host the Google Analytics script on your server, something that Google does not like but it works.

To achieve this you can use a plugin called Complete Analytics Optimization Suite which precisely allows, among other things, to host the file analytics.js from Google Analytics, updating it using wp_cron () .

 adjustments-plugin-chaos-local-analytics "width =" 838 " height = "695" srcset = " 840w, -content / uploads / 2016/09 / adjustments-plugin-chaos-local-analytics-550x457.jpg 550w, analytics-768x638.jpg 768w, h ttps: // 1436w "sizes =" (max-width: 838px) 100vw, 838px "/> </a> </p>
<p> The benefits of <strong> hosting your Google Analytics script </strong> locally is that <strong> reduces HTTP requests to Google by half </strong>in addition to having full file control, which means that you can apply the cache rules in headers that we have seen before. </p>
<p> The operation of the plugin is simple, you install and activate it, you put in the settings your Google Analytics tracking ID and the plugin does everything else: it adds the tracking code to your WordPress, download the file <code> analytics.js </code> on your server and update it using a script programmed in <code> wp_cron () </code>. </p>
<p> Of course, <strong> no use this plugin in conjunction with other Google Analytics plugins </strong>no matter how much you like it, or it will not work. </p>
<h3><span id= Leverage B Caching and social networks

Other elements that tend to give errors are those related to social networks like Facebook and Twitter since it is rare web that does not have a widget to show the last tweets or to I like it on your Facebook page, and of course, all these scripts, to show the followers and tweets in real time slow down the loading of your website while doing the checks.

The solution does not equal you like but goes through avoid this kind of plugins and widgets . If you want to show the followers put an image and link it to your profiles, period. It's almost never worth showing real-time tweets .

Leverage Browser Caching and Google Maps

Similar, but worse, is the case of Google Maps since it requires that several scripts identify if the user who sees the map is connected to your Google account and which, determines its location, saved maps, and more.

This type of elements are increasingly used in corporate websites, especially on the contact page, but they do not really contribute much beyond the aspect.

Solution? There is no direct fix possible, but what I have seen in many places, and get the result, is replace the script that loads the map in real time with a capture of it linked to the Google Maps URL the location in question

The user clicking will open the location, in his maps application even if it is from a mobile, so you offer the functionality at the same time you optimize the web . [19659222] And the rest of the scripts?

There's another good bunch of possible external scripts that you may be using. I'm talking about newsletters service codes, ad servers and a thousand other things .

Here you'll have to decide if the functionality they give you is worth to compromise performance and load times of your web.

Summing up

 leverage-browser-caching "width =" 838 "height =" 419 "srcset =" /leverage-browser-caching-840x420.png 840w, 550w, -content / uploads / 2016/09 / leverage-browser-caching-768x384.png 768w, 319w "sizes = "(max-width: 838px) 100vw, 838px" /> </a> </p>
<p> As you may have seen, <strong> it is possible to reduce the errors of <em> Leverage Browser Caching </em>and optimize your website to the maximum possible </strong>but also remember that you should not take the foot of the letter the recommendations and results of these speed analyzers. </p>
<p> And, above all, that you must <strong> decide in each case what you win and what you lose </strong>before changing the expiration times of a resource or delete it. </p>
<p> But it is good that at least you apply some of the techniques seen here, because the reality is that <strong> will improve the performance of your web and your WordPress will go faster </strong>. </p>
<p> If you know some other trick to reduce errors of <em> Leverage Browser Caching </em> you tell us in the comments. </p>
<div id= Loading …

That may also help you: