Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

2 Answers 2

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.