• Home »
  • Insights »
  • Disable Trackbacks In Existing WordPress Blog, Stop WordPress Trackback SPAM

Disable Trackbacks In Existing WordPress Blog, Stop WordPress Trackback SPAM

Trackbacks, also known as pingbacks, in WordPress are a great idea however they typically generate a lot of SPAM for little benefit. A trackback is generated within a post on your site by another bloggger linking to your WordPress article. Personally I disable the display of trackbacks in most WordPress sites however I still let the sites backend process trackbacks as it normally would. This means the person generating the trackback assumes that it functions properly and the WordPress site owner still receives notification via email of the trackback or pingback. Recently though my stance is changing to completely disable trackbacks on all posts and to go back and disable it in article that were previously published and disable trackbacks in those as well because the SPAM has been getting more intense over the past 6 months. Use the instructions below to disable trackbacks on your WordPress site.

Disable Trackbacks On Future WordPress Blog Posts:

To disable trackbacks on future WordPress blog posts it only takes a single checkbox in the WordPress admin portion of your site. Login to the WP admin portion of your site, expand the Settings side menu, and click on Discussions which will display the Discussions Settings portion of your site as shown in the below example image.

Allow Link Notifications From Other Blogs (Pingbacks And Trackbacks):

Disable - Allow Link Notifications From Other Blogs - Trackbacks and Pingbacks

Remove the check from the Allow Link Notifications From Other Blogs (Pingbacks and Trackbacks) checkbox as shown in the example image above. Once the check is removed click the Save Changes button located at the bottom fo the Discussion Settings page. Now that this is modified any future posts on your WordPress site will no longer accept Trackbacks and Pingbacks which will cut down on the amount of SPAM received via these methods.

Turn Off Trackbacks And Pingbacks From Previous WordPress Posts:

If you have already published posts on your WordPress site you will also need to go back and disable trackbacks on those articles as well. This can be done via phpMyAdmin or via the MySQL CLI using the syntax that is noted below. First though lets look at the MySQL table structure of the WordPress posts table which is displayed below.

WordPress MySQL Database Posts Table Structure:

mysql> describe posts;
+-----------------------+---------------------+------+-----+---------------------+----------------+
| Field                 | Type                | Null | Key | Default             | Extra          |
+-----------------------+---------------------+------+-----+---------------------+----------------+
| ID                    | bigint(20) unsigned | NO   | PRI | NULL                | auto_increment |
| post_author           | bigint(20) unsigned | NO   | MUL | 0                   |                |
| post_date             | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_date_gmt         | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_content          | longtext            | NO   | MUL | NULL                |                |
| post_title            | text                | NO   | MUL | NULL                |                |
| post_category         | int(4)              | NO   |     | 0                   |                |
| post_excerpt          | text                | NO   |     | NULL                |                |
| post_status           | varchar(20)         | NO   |     | publish             |                |
| comment_status        | varchar(20)         | NO   |     | open                |                |
| ping_status           | varchar(20)         | NO   |     | open                |                |
| post_password         | varchar(20)         | NO   |     |                     |                |
| post_name             | varchar(200)        | NO   | MUL |                     |                |
| to_ping               | text                | NO   |     | NULL                |                |
| pinged                | text                | NO   |     | NULL                |                |
| post_modified         | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_modified_gmt     | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_content_filtered | text                | NO   |     | NULL                |                |
| post_parent           | bigint(20) unsigned | NO   | MUL | 0                   |                |
| guid                  | varchar(255)        | NO   |     |                     |                |
| menu_order            | int(11)             | NO   |     | 0                   |                |
| post_type             | varchar(20)         | NO   | MUL | post                |                |
| post_mime_type        | varchar(100)        | NO   |     |                     |                |
| comment_count         | bigint(20)          | NO   |     | 0                   |                |
+-----------------------+---------------------+------+-----+---------------------+----------------+
24 rows in set (0.00 sec)
mysql>

As you can above there are 24 columns in the posts table. In this scenario we are going to be modifying the value of the ping_status column on every row in the MySQL table by changing its value from open to closed.

MySQL Syntax Used To Modify ping_status Column In Posts Table:

update posts set ping_status = 'closed';

Once you are logged into MySQL make sure that the correct database is active and issue the above command which will provide results similar to the below example output.

Example Of Modifying ping_status From Open to Closed On WordPress Posts Table:

mysql> update posts set ping_status = 'closed';
Query OK, 8393 rows affected (0.64 sec)
Rows matched: 8471  Changed: 8393  Warnings: 0
mysql>

In the above example you can see that 8,393 rows out of 8,471 were modified. This means that some of the rows already had trackbacks disabled.

Professional WordPress Plugin Development (Paperback)

By (author): Brad Williams, Ozh Richard, Justin Tadlock


List Price: $44.99 USD
New From: $23.92 USD In Stock
Used from: $16.35 USD In Stock

The Official Ubuntu Server Book (2nd Edition) (Paperback)

By (author): Kyle Rankin, Benjamin Hill


List Price: $44.99 USD
New From: $5.29 USD In Stock
Used from: $1.09 USD In Stock

Share