Over time the trash can build up on your WordPress site. You are most likely continuously sending old posts and marking low-quality comments as trash. Just like on your computer, the trash bin (a portion of your WordPress site’s database in this case) will keep growing bigger and bigger until you empty it.

Delete posts in the trash
Follow the steps below on how to delete posts in the trash on your WordPress site. This includes posts, pages, and custom post types.
Important: These functions make permanent changes that cannot be reverted! Back up your database before proceeding.
Step 1
Click into the Perfmatters plugin settings.

Step 2
Click on the “Tools” submenu.

Step 3
Click on the “Database” submenu.

Step 4
Scroll down and toggle on “Trashed Posts.” The number of posts found in the trash will show up to the right of it.

Step 5
Scroll down and click “Optimize Now.”

The process will run in the background. You don’t need to stay in the plugin while it’s running or worry about leaving the window open.

It will let you know when it’s finished with a notification at the top of the Perfmatters plugin settings.

Delete comments in the trash
Follow the steps below on how to delete comments in the trash on your WordPress site. This includes comments made anywhere on your site that have been marked as trash, including posts, pages, and custom post types.
Important: These functions make permanent changes that cannot be reverted! Back up your database before proceeding.
Step 1
Click into the Perfmatters plugin settings.

Step 2
Click on the “Tools” submenu.

Step 3
Click on the “Database” submenu.

Step 4
Scroll down and toggle on “Trashed Comments.” The number of comments found in the trash will show up to the right of it.

Step 5
Scroll down and click “Optimize Now.”

The process will run in the background. You don’t need to stay in the plugin while it’s running or worry about leaving the window open.

It will let you know when it’s finished with a notification at the top of the Perfmatters plugin settings.

Check out our documentation on WordPress database optimization for other easy ways to clean up your database with Perfmatters. You can also delete posts and comments in the trash on an automated schedule.