WordPress is a commonly used CMS by website owners. WordPress is easy to manage and customer friendly, but it comes with its share of errors and hiccups.
One such error reported in WordPress site management is “Error moving to trash”, when site owners try to delete posts or pages via WordPress admin interface.
At Bobcares, resolving website errors for account owners is a major task we perform as part of ourSupport Services.
When do you see “Error moving to trash” in WordPress?
WordPress posts can be managed using an admin interface at ‘wp-admin’ URL. Website owners can create and delete posts, install plugins, and change themes from here.
The message “Error moving to trash” shows up in WordPress when website owners try to delete posts, pages, comments, etc. from this WordPress admin panel.
The error is reported when users try to delete both published and drafts posts, when deleting a single post or during Bulk deletion of posts.
At times, the post will not get deleted though no error message would be shown. In some other scenarios, moving a post to trash loads a blank page in return.
There are also situations where some posts get deleted and others don’t. Here, we’ll see the various reasons why this happens.
WordPress “Error moving to trash” – Major causes
1. WordPress cache
When a website owner deletes a WordPress post, the post may actually get deleted but still show up in the page or give out a blank page.
This usually happens due to WordPress cache or cache plugins. Browser specific cache, cookie settings or version issues can also lead to similar issues.
2. Plugin errors
Most website owners install and configure plugins in their WordPress site. There are plugins that serve a variety of purposes – SEO optimization, post deletion, cache management, etc.
But malfunctioning plugins or bugs in the code can cause WordPress sites to face issues when certain plugins are installed. The error while moving to trash can occur in such scenarios.
3. Database corruption
WordPress is database oriented CMS. Over time or usage, any tables in the database can get corrupted. This corruption can lead to WordPress “Error moving to trash”.
4. Permission issues
WordPress can have multiple user accounts. But not all users will have the privilege to delete the posts. If a user does not have adequate privilege, he will see error when moving to trash.
The folders and files within WordPress should be configured with proper permissions and ownership, for the site to work fine. Any wrong settings in these cause errors during deletion.
5. WordPress bug
Bugs in WordPress versions can also be a reason for this error. For instance, a bug in version 2.9 throws ‘try again’ error when moving posts to trash.
How to fix WordPress “Error moving to trash”
The error in WordPress while moving posts to trash, is debugged in a step-by-step manner.
1. Clear cache and cookies
If the WordPress still shows deleted posts or a blank page after post deletion, the first step is to clear the browser cache and cookies.
After clearing the cache, the browser is refreshed and site is reloaded. The deleted posts will no longer show up.
2. Disable problematic plugins
The next step is to disable the problematic plugin. One hint is to focus on the recently installed or updated plugins, after which the error started popping up.
Plugins that involve manipulating or managing the posts are another category of suspects. In extreme scenarios, we need to disable plugins one by one, and then test to pinpoint the problem maker.
3. Repair the database
Another fix that helps is to repair the WordPress database. WordPress itself has provision to repair the database via admin portal.
We put the site into maintenance mode and repair the database. Once the database repair is completed, the corrupt tables get fixed.
In certain scenarios, the database may be corrupt beyond repair and need restoration from backups. Repairing the database helps to fix the post deletion error mostly.
4. Check the permissions
If the post deletion error happens to users other than the admin user, verifying the privileges of the logged in user is a crucial step to be performed.
Non-admin users will not be able to delete posts created by other users. We also verify the ownership and permissions of the WordPress folders including trash, and confirm it is fine.
5. WordPress update
If the WordPress running in the site is old buggy version, the last step is to update it to the latest version. Proper backups are taken before updates to revert in case of failures.
Conclusion
“Error moving to trash” in WordPress happens due to various factors in the WordPress site. Today we saw the top causes for the error and how our Support Engineers fix them.
Great post!
Thank you Eva
Really love this
Thank you !
Great Post. My issues were fixed after I Clear cache and cookies.
Thank you
We are pleased to learn that you were able to resolve the issue using the information in this article.
sangat bermanfaat pas edit bingung, ini solusinya, mksh
We are pleased to learn that you were able to resolve the issue using the information in this article.
Well done i impress this blog too much and i have solved my problem after clearing cache
Thanks
Thanks for the feedback.We are glad to know that it worked for you ? .
Invaluable to me! It really works, kudos to Bobcares
We are happy to hear that the solution you found in this article allowed you to solve the problem.