0

I'm trying to delete around 250 posts at once, but the next page I am taken to displays the error:

Request-URI Too Large

The requested URL's length exceeds the capacity limit for this server

Does Wordpress need to use a HTTP Post action to delete posts?

0

Make a custom page template and put this code in it. It will delete as many pages as you want.

<?php
global $post;

$args = array( 'numberposts' => 250 );
$myposts = get_posts( $args );
foreach( $myposts as $post ) :

wp_delete_post( $post->ID, true );

endforeach; ?>

http://codex.wordpress.org/Function_Reference/get_posts

0

Thanks. I ended up deleting them through PHPMyAdmin. They were all in the same category.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.