Skip to Content

Does moving a post to trash delete it?

Does moving a post to trash delete it?

When you no longer want a post on your WordPress site, you have a few options for removing it. The easiest is to move the post to the Trash. But does this delete the post completely? Or can you recover it later if you change your mind?

The short answer is that trashing a post does not permanently delete it. The post still exists in the database, it just gets hidden from public view. This gives you a chance to restore the post if needed. Permanently deleting posts requires an additional step of emptying the Trash.

What happens when you trash a post?

When you click the Trash link under a post, WordPress does a few things:

  • It changes the post status from Published to Trash.
  • It removes the post from public view on your site.
  • It moves the post to the Trash folder in your WordPress dashboard.

Behind the scenes, WordPress adds some post meta data to track the original publish date and author of the trashed post. But the critical thing is that trashing does not delete any data from the wp_posts table in the database. The post content, metadata, etc still exist.

This allows you to easily restore a trashed post:

  • From the Trash folder, click the Restore link to republish the post.
  • The post status will change back to Published.
  • The post will become visible on your site again.

So trashing is like a soft delete or archive. The post is hidden away until you’re ready to restore it.

When does a trashed post get deleted?

WordPress does not immediately delete trashed posts. And they won’t get deleted on their own either.

A post that gets trashed will stay in the Trash folder forever, until you take action.

To permanently delete trashed posts, you need to empty the Trash. This can be done a couple ways:

  • In your WordPress dashboard, go to Posts > Trash and click Empty Trash.
  • Or on the Posts screen, hover over the Trash link and select Empty Trash.

Emptying the Trash will delete all posts that currently reside there. So be sure those are posts you want to permanently erase before emptying the Trash.

Once deleted, those posts are removed from the wp_posts table in the database. And any associated data, like comments and metadata, get cleaned up from the database as well.

So Empty Trash is really the delete step. Trashing just hides and archives posts for the time being.

Can you recover a post after emptying the Trash?

If you happen to empty the Trash by accident, is there any way to recover those deleted posts?

Unfortunately, once you empty the Trash, those posts and all their data are gone for good. There is no built-in way within WordPress to retrieve them.

This is why it’s critical to double check the Trash before emptying it, to make sure you don’t have any posts in there that you want to keep.

However, if you act quickly, you may be able to recover deleted posts through:

  • Your hosting provider: Some hosts keep backups that you can restore.
  • WordPress plugins: There are plugins that can rescue a just-deleted post.
  • Database backups: If you have a recent complete database backup, the post data may still be intact.

But these recovery options are hit or miss. There’s no guarantee you can get back a post once it’s permanently erased.

So be very careful when emptying the Trash. Check its contents closely first, or even remove large batches of posts manually to have more control.

Does trashing pages work the same as posts?

Everything we’ve discussed applies to regular posts, but what about other content types like Pages?

The good news is that Pages follow the same rules when sent to the Trash. Trashing does not immediately delete them. And they’ll remain in the Trash folder until it’s manually emptied.

So you can safely trash Pages to temporarily hide them, then restore as needed. Just be careful when emptying the Trash, as Pages in there will be deleted too.

This consistency is helpful, as trashing any content type serves as a holding spot until you confirm it should be permanently erased.

What about trashing attachments?

Uploads like images, documents, and media can also be trashed in WordPress. They’ll follow the same workflow:

  • Trashed attachments are hidden from public view.
  • They move to the Uploads > Trash folder in your dashboard.
  • They stay there until the Trash is emptied.

The main difference is that attachments are not tied to a post. So trashing an image won’t affect any posts where that image is used. Those posts will retain the uploaded file URL.

But when the Trash is emptied, the attachments and their physical files are deleted from the server. Any posts linking to them will show a broken image or file.

So trashing attachments serves as a useful way to clean up unused media that’s just taking up server space. Just be mindful of any links before emptying.

Does the Trash work differently for pages, media, etc?

In summary, these core WordPress content types all behave the same way when trashed:

  • Posts – Can be restored until Trash is emptied.
  • Pages – Trashing hides but doesn’t delete.
  • Media – Trashed files can be restored as needed.

The Trash serves as temporary storage and allows you to undo any removals. But emptying the Trash will permanently delete all these content types and their associated data.

So the Trash acts as a recycling bin for all your site’s content. Use it to clean up and archive anything you don’t need publicly visible for the time being.

Should you disable the Trash feature?

Since trashing does not delete posts right away, you may wonder about fully disabling the Trash feature.

Without a Trash, all deletions would be permanent and bypass any recovery window. But this is not generally recommended.

Having a Trash is useful for:

  • Easily restoring mistaken deletions.
  • Temporarily removing content, but keeping it accessible.
  • Preventing accidental permanent deletion.

Plus, there are no configuration options within WordPress itself to disable the Trash. You would need a plugin, custom code, or database edits to remove the Trash.

Overall, it’s better to use the Trash as intended. Be sure to empty it periodically after confirming you no longer need any trashed posts or uploads.

The Trash gives you an added safety net when removing content from public view.

Conclusion

The Trash system in WordPress provides a critical buffer zone when deleting content.

Trashed posts, pages, and media are hidden from view but not immediately wiped from the database. This gives you a window to restore anything that was removed accidentally or that you change your mind about.

Content will persist in the Trash indefinitely until it is manually emptied. Emptying the Trash permanently deletes all trashed items and their associated data.

So be very careful when emptying the Trash, as there is no built-in recovery method after that. Make sure any posts or uploads you want to keep are restored first.

Overall the Trash adds a useful layer of protection against accidental deletions. Use it as temporary storage for content, and empty periodically once you’ve confirmed nothing important still resides there.

Content Type What happens when trashed How to permanently delete
Posts Hidden from view but not deleted Empty trash
Pages Removed from public view Empty trash
Media Files hidden but still exist Empty trash

Related questions

Some other common questions about the WordPress Trash include:

  • How long do trashed posts stay in the Trash?
  • Why are some posts skipped when emptying the Trash?
  • Can you delete posts without sending to Trash first?
  • How can I permanently delete trashed posts outside of WordPress?

The Trash seems simple but has some nuance in terms of what gets deleted and when. But overall it acts as an essential safety cushion when removing site content.