WP Super Cache vollständig aus WordPress entfernen

Wer viel mit WordPress arbeitet, weiß dass ab und an auch ein Cache von Nöten ist, damit Seiten schneller aufrufbar sind.
Gerade in Zeiten von mobiler Optimierung ist es hilfreich, Bilder eben nicht immer vom Besucher neu laden zu lassen.
Dafür gibt es dann Plugins, in unserem Beispiel WP Super Cache.

Was aber tun, wenn der Cache mal nicht mehr benötigt wird. Aus welchem Grund auch immer. Dann wird es ganz schnell brenzlig. Einfach mit Plugin deinstallieren ist es nicht getan. Denn der Cache verbeist sich richtig fest in der Datenbank. Und wer schon mal in die Datenbank seines WordPress-Systems geschaut hat, weiß nun wie schnell man da etwas findet. Inmitten der tausenden Einträgen. So tüftelten auch wir und suchten nach Lösungen. Wenn nun nichts dagegen unternommen wird, wirft die betroffene Seite Error 500 Fehler welche das weitere Arbeiten unmöglich machen. Wir hatten hier schon das Plugin Jetpack in Verdacht, welches zwar die eierlegende Wollmilchsau darstellt, aber eben auch durch seinen Umfang schnell zu Problemen führen kann. So, wie nebenan bei swinki.de.

Lösung 1: Das WP-Cache Plugin ordnungsgemäß deaktivieren und dann entfernen

Dazu fanden wir im WordPress-Forum folgende englische Anleitung:

How to uninstall WP Super Cache

Almost all you have to do is deactivate the plugin on the plugins page. The plugin should clean up most of the files it created and modified, but it doesn’t as yet remove the mod_rewrite rules from the .htaccess file. Look for the section in that file marked by SuperCache BEGIN and END tags. The plugin doesn’t remove those because some people add the WordPress rules in that block too.

To manually uninstall:

Turn off caching on the plugin settings page and clear the cache.
Deactivate the plugin on the plugins page.
Remove the WP_CACHE define from wp-config.php. It looks like define( ‘WP_CACHE’, true );
Remove the Super Cache mod_rewrite rules from your .htaccess file.
Remove the files wp-content/advanced-cache.php and wp-content/wp-cache-config.php
Remove the directory wp-content/cache/
Remove the directory wp-super-cache from your plugins directory.

If all else fails and your site is broken

Remove the WP_CACHE define from wp-config.php. It looks like define( ‘WP_CACHE’, true );
Remove the rules (see above) that the plugin wrote to the .htaccess file in your root directory.
Delete the wp-super-cache folder in the plugins folder.
Optionally delete advanced-cache.php, wp-cache-config.php and the cache folder in wp-content/.

Wenn das aber nichts hilft – weil man es zu spät gelesen hat oder keine Bilder in der Anleitung enthalten waren und deswegen nichts verstanden hat (*IRONIE*), dann hilft nur noch Lösung 2.

Lösung 2: Die Datenbank per SQL-Befehl bereinigen

Bei den Kollegen von w-shadow.com fanden wir dann folgende hilfreiche SQL-Anweisung:

DELETE a, b
FROM wp_options a, wp_options b
WHERE a.option_name LIKE "_transient_%" AND a.option_name NOT LIKE "_transient_timeout_%" AND b.option_name = CONCAT( "_transient_timeout_", SUBSTRING( a.option_name, CHAR_LENGTH("_transient_") + 1 ) ) AND b.option_value < UNIX_TIMESTAMP() 
DELETE a, b
FROM wp_options a, wp_options b
WHERE a.option_name LIKE "_site_transient_%" AND a.option_name NOT LIKE "_site_transient_timeout_%" AND b.option_name = CONCAT( "_site_transient_timeout_", SUBSTRING( a.option_name, CHAR_LENGTH("_site_transient_") + 1 ) ) AND b.option_value < UNIX_TIMESTAMP()

Nun werden wir weiter prüfen, ob die Abfrage etwas gebracht. Wir werden weiter berichten.
Wenn Sie Fragen rund um WordPress, Administrations- oder Installationsprobleme haben, scheuen Sie nicht zu fragen. Wir betreuen auch ihr WordPress System zu Ihrer vollsten Zufriedenheit.


wallpaper-1019588
Die Algarve feiert 50 Jahre Nelkenrevolution
wallpaper-1019588
Mobile Suit Gundam SEED FREEDOM: Bandai Namco zeigt den Film in den deutschen Kinos
wallpaper-1019588
[Manga] Demon Slayer [2]
wallpaper-1019588
Soundtrack einer Generation: Musik und visuelle Medien harmonisieren