You are here:
  1. Home
  2. Blog
  3. WordPress
  4. Disable WordPress Trash

Disable WordPress Trash

 |  WordPress

I have a habit of deleting a post in WordPress and then 3 days later re-writing it from scratch. I consider this part of my strange but effective editorial process. However, when the WordPress gurus introduced the trash can feature I suddenly started getting posts with URLs like “permalink-2”, “permalink-3”.

D’oh — my posts were being held in the trash! This meant WordPress was generating me a unique post slug by adding numbers. Easier than changing my weird blogging habits was to disable the trash can. This can be done by editing wp-config.php to include the following line:

define('EMPTY_TRASH_DAYS', 0 ); // zero days - no trash

Simple!

Note: I would never recommend disabling the trash can for a commercial client or blog with multiple authors. The ability to rescue accidentally deleted posts is far too valuable.

Jem Turner jem@jemjabella.co.uk +44(0)7521056376

Comments are closed.

Follow on Instagram