Title: Removing Posts in PhpMyAdmin
Last modified: September 24, 2020

---

# Removing Posts in PhpMyAdmin

 *  Resolved [newbonuses](https://wordpress.org/support/users/newbonuses/)
 * (@newbonuses)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/removing-posts-in-phpmyadmin/)
 * I am trying to remove posts from PhpMyAdmin.
 * I followed the advice on this post:
 * [https://wordpress.org/support/topic/need-help-deleting-tens-of-thousands-of-posts/](https://wordpress.org/support/topic/need-help-deleting-tens-of-thousands-of-posts/)
 * I used this to delete the meta data and it worked:
 * DELETE FROM wp_postmeta WHERE post_id in (SELECT ID FROM wp_posts WHERE ID BETWEEN
   10866 AND 38059);
 * But I’m having an issue with the removing the posts.
 * I used the code in that thread:
 * DELETE FROM wp_posts where ID GE 10866 AND ID LE 38059;
 * It brings up an error:
 * #1064 – You have an error in your SQL syntax; check the manual that corresponds
   to your MariaDB server version for the right syntax to use near ‘GE 10866 AND
   ID LE 38059’ at line 1
 * I can’t seem to figure out the correct syntax to make it work.
 * Can someone please let me know the correct syntax?
 * Much thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [AddWeb Solution](https://wordpress.org/support/users/addweb-solution-pvt-ltd/)
 * (@addweb-solution-pvt-ltd)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/removing-posts-in-phpmyadmin/#post-13448490)
 * Hi [@newbonuses](https://wordpress.org/support/users/newbonuses/),
 * Please try to execute the below-mentioned query.
 * `DELETE FROM wp_posts where ID BETWEEN 10866 AND 38059`
 * I hope this will help you.
 * Regards,
 *  Thread Starter [newbonuses](https://wordpress.org/support/users/newbonuses/)
 * (@newbonuses)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/removing-posts-in-phpmyadmin/#post-13448521)
 * Ok. That worked perfectly. Thanks a million!
 *  [bestspeaker](https://wordpress.org/support/users/bestspeaker/)
 * (@bestspeaker)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/removing-posts-in-phpmyadmin/#post-13448916)
 * good

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Removing Posts in PhpMyAdmin’ is closed to new replies.

## Tags

 * [delete posts](https://wordpress.org/support/topic-tag/delete-posts/)
 * [phpmyadmin](https://wordpress.org/support/topic-tag/phpmyadmin/)
 * [SQL syntax](https://wordpress.org/support/topic-tag/sql-syntax/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [bestspeaker](https://wordpress.org/support/users/bestspeaker/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/removing-posts-in-phpmyadmin/#post-13448916)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
