Black Friday - Cyber Monday Sale
30% OFF All Premium Licenses
  • 00 Days
  • 00 Hrs
  • 00 Mins
  • 00 Secs
Use code
SIGMA30

This 30% discount applies only to the first year. From the second year, renewals are charged at the regular price.

What are WordPress trackbacks and how to clean them?

Younes JFR.

What are trackbacks?

Trackbacks are a legacy system that allows other blogs to notify you when they link to your content. Although similar to pingbacks, trackbacks are manually created by the sender and are often used by spammers. Modern WordPress sites rarely use them today.

How they affect your database?

Trackbacks are stored in the wp_comments table with the type trackback. Even though they’re outdated and often disabled, old installations may still contain many of them. These unused entries take up unnecessary space and can slightly affect performance and backup times.

How to clean them?

1. Using Advanced Database Cleaner plugin

You can easily delete old trackbacks using the General Cleanup module in Advanced Database Cleaner plugin.

This method is reliable, safe, and can be fully automated. You can set it to:

  • Remove all trackbacks or keep only those created within the last X days.
  • Use the Keep Last option to retain a limited number when needed.
  • Schedule automatic cleanups to regularly delete unnecessary trackbacks.

2. Using a raw SQL query

If you prefer to handle it manually, run this SQL query in phpMyAdmin for example:

DELETE FROM wp_comments WHERE comment_type = 'trackback';

In multisite networks, run the same query for each subsite, replacing wp_ with the corresponding subsite prefix (for example, wp_2_, wp_3_, etc.).

Note:
While you can manually run these SQL commands to clean trackbacks, we strongly recommend using the Advanced Database Cleaner plugin.
It uses WordPress’s internal cleaning methods, automatically handles multisite installations, and ensures that all related data is safely removed while keeping your database consistent and stable.