• I’m using WP MU and I need to delete all posts by a single author. The trouble is that means deleting 19,000 posts. Even 100 at a time this is a daunting task. Please share and easier way.

    [Moved to Multisite by moderator]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Backup Database First

    Database query:

    1. Run (just to make sure it reads his 19000 posts)

    select *from wp_posts WHERE post_author='n'
    replace ‘n’ with his number (find it out in the database)

    2. Run
    delete *from wp_posts WHERE post_author='n'

    Once again, backup your database first, there could be your WP MU environment limitation or else.

    I would recommend to create a new author, publish a few dummy posts and run these two snippets ( just to make sure it works ) before killing a big fish.

    corrected

    instead of

    delete *from wp_posts WHERE post_author='n'

    run

    delete from wp_posts WHERE post_author='n'

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delete All Posts by an Author — if the author has a large number of posts’ is closed to new replies.