Removing Posts in PhpMyAdmin | WordPress.org

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/

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!



Source link