add_action('init', function() {
if (!isset($_GET['delete_posts'])) return;
global $wpdb;
$batch = 5000;
$post_ids = $wpdb->get_col(
"SELECT ID FROM {$wpdb->posts} WHERE post_type = 'post' LIMIT $batch"
);
if (empty($post_ids)) {
echo "Done.";
exit;
}
$ids_str = implode(',', array_map('intval', $post_ids));
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id IN ($ids_str)");
$wpdb->query("DELETE FROM {$wpdb->posts} WHERE ID IN ($ids_str)");
echo count($post_ids) . " posts deleted.";
exit;
});
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home/standa9/public_html/wp-content/mu-plugins/index.php:1) in /home/standa9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":538,"date":"2020-11-01T19:02:30","date_gmt":"2020-11-02T00:02:30","guid":{"rendered":"https:\/\/supcom.standardof.net\/?page_id=538"},"modified":"2020-11-03T00:12:07","modified_gmt":"2020-11-03T05:12:07","slug":"cybran","status":"publish","type":"page","link":"https:\/\/supcom.standardof.net\/cs\/supreme-commander\/cybran\/","title":{"rendered":"CYBRAN"},"content":{"rendered":"