WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My clients has recently had a problem with spam posts being added to their blog, under various usernames. The users have been deleted, but Wordpress is not able to remove the posts from the trash. Using the 'Empty Trash' button does not work either. Removing directly from the database appears to work, but as there are 4000+ entries this would take a long time.

This is Wordpress v3.4.1 and has been upgraded recently.

Can anybody help?

share|improve this question
Does these posts has some common signature, e.g. date_created between so and so? – Max Yudin Jul 18 '12 at 10:20
They were posted on the same date, but none at the exact same time. – glitchmunki Jul 18 '12 at 10:59
Does the client get an error when they press the empty button? – Joseph Leedy Jul 18 '12 at 12:16
The page does eventually blank screen, but I think that is more down to memory maxing out than a corrupted script. – glitchmunki Jul 18 '12 at 13:38
i also have the same problem on one of my blogs. too many spam posts... i cant delete the users and the posts... always this message "error moving to trash". got now about 5000 posts to delete and nothing works. can anybody help on that? btw, i tried define('EMPTY_TRASH_DAYS', 0 );... but no luck on that. – user23284 Nov 4 '12 at 9:25
up vote 0 down vote accepted

Technically, defining define('EMPTY_TRASH_DAYS', 0 ); in wp-config.php file should delete whatever is in Trash after zero days. I just tried it, but didn't work immediately. I may have to wait for a day to see the result.

share|improve this answer
Yeah I tried that myself, but it didn't work immediately for me either. – glitchmunki Jul 18 '12 at 10:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.