WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

global $post;

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

wp_delete_post( $post->ID, true );

endforeach; ?>


share|improve this answer
up vote 0 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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