DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Do you use trackbacks and pings? Many people find them useless and asked me how they can get rid of them. Sure you can close trackbacks post by post, but this will consume a lot of time. Or you can use a good old SQl query, as shown in this article.

Simply run the following SQL query on your WordPress database, using the command line client or PhpMyAdmin. This will close pingbacks/trackbacks on all existing posts.
Don’t forget to backup your database before using this query.

UPDATE wp_posts SET ping_status = 'closed';

If you like to know more about WordPress SQL queries, you should have a look to this article.

Thanks to Jeff Starr for this nice piece of code!



  1. yes this is perfect .. i like coding via Mysql.

    going through options and plugins is useless and time wasting.

    i am sick of these trackbacks on my client’s website , glad we have this little line to our rescue

  2. Finally got rid of spam, it’s easy and 3 step solution. Thanks a bunch.

Leave a Comment

Your email address will not be published. Required fields are marked *