WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] SQL query to delete postmeta

[Resolved] SQL query to delete postmeta

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think this is right.

    DELETE pm
    FROM wp_postmeta pm
    LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
    WHERE wp.ID IS NULL;

    This code comes with no warranty or promise of fitness for any purpose whatsoever. Test it on a development server with dummy data or may god have mercy on your soul.

    perfect,

    thx man

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] SQL query to delete postmeta’ is closed to new replies.
Skip to toolbar