forked from joglomedia/masedi.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbersihkan-rss-bot-edane-db.php
33 lines (30 loc) · 1.21 KB
/
bersihkan-rss-bot-edane-db.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
// maintenance script to clear the default WP Options cache
/*
* Plugin Name: iPaymu for WooCommerce
* Plugin URI: http://masedi.net/wordpress/plugins/clear-wp-option-cache.html
* Description: Delete feed option table caused by STT2 RSS, RSS and Search engine bot stored in wo-options
*
* Installation: install/upload this file clear-wp-option-cache.php on root of your wordpress installation
* Usage: access this file from your browser and it will automatically DELETE table row with option_name like this:
* %_transient_timeout_feed_mod_%
* %_transient_timeout_feed_%
* %_transient_feed_mod_%
* %_transient_feed_%
*
* Author: MasEDI
* Author URI: http://masedi.net/
*/
require( 'wp-config.php' );
global $wpdb;
$query = "DELETE FROM $wpdb->options WHERE option_name LIKE '%_transient_timeout_feed_%' OR option_name LIKE '%_transient_feed_%'";
$result = $wpdb->query($query);
if (!$result) {
echo "This query: ' $query ' failed to execute <br />";
$wpdb->print_error();
exit();
}else{
echo "This query: ' $query ' has been executed succesfully. <br />
All value like %_transient_timeout_feed_% and %_transient_feed_% row in ".$wpdb->prefix."options has been deleted";
}
?>