Why is \'__trashed 12\' Appearing in My WordPress URLs? Understanding and Fixing the Issue
Seeing \'__trashed 12\' unexpectedly added to your WordPress URLs can be frustrating. This often indicates an issue with how WordPress handles permalinks, especially related to trashed and restored posts or pages. Let\'s delve into what causes this and how to fix it.
Understanding the \'__trashed\' Suffix in WordPress
The \'__trashed\' suffix, along with a number (e.g., \'__trashed 2\', \'__trashed 12\'), is typically added by WordPress to the slug (the part of the URL after your domain name) of a post or page that has been moved to the trash. This prevents URL conflicts if you have multiple posts or pages with the same slug.
According to WordPress.com Forums, the \'add_trashed_suffix_to_trashed_posts\' PHP filter is designed to add this suffix. This filter helps ensure that even if a post is deleted and then restored, it doesn\'t overwrite an existing page with the same original URL.
Common Scenarios and Solutions
- Accidental Trash and Restore: The most common cause is that a page or post was accidentally moved to the trash and then restored. Once this happens, WordPress might lock the URL with the \'__trashed\' suffix.
- Solution: Edit the page/post and manually change the permalink back to its original, desired slug. If the original slug is already in use, WordPress will prompt you to choose a unique one.
- Random \'__trashed\' Appearance: Some users report that the \'__trashed\' suffix appears randomly, even without the post ever being trashed. This is a rarer issue but can be caused by plugin conflicts or database inconsistencies. One user on WordPress.com forums, sleepiergirl, shared this exact problem.
- Solution:
- Check for Plugin Conflicts: Deactivate plugins one by one to identify if a specific plugin is causing the issue.
- Check your trash: The __trashed suffix appears when a page is in the trash. Emptying the trash and deleting the page can sometimes fix the problem. __trashedが表示されるのは「ゴミ箱」にページが入っている時です。 そのため、ゴミ箱から 「完全に削除」 をすることで、完全に表示されないようにすることがで
- Database Check: Consult with a WordPress developer to check your database for any inconsistencies related to post slugs.
- Child Page Issues: In some cases, particularly with child pages in drop-down menus, the \'__trashed\' suffix might appear after making a site live.
- Solution: Double-check the parent page settings and ensure the child page is correctly linked. Manually edit the child page\'s permalink.
- Redirects and Deleted Pages: If you have redirects set up (e.g., using a plugin like Yoast SEO), a conflict between a live page and a deleted page might lead to the \'__trashed\' suffix appearing.
- Solution: Review your redirects and ensure they are correctly pointing to the intended pages. Delete or adjust redirects related to trashed pages. As an example: "There is created a redirect from /software/ to /yoast-seo-platforms/ which works correctly. However, if there is a live page in the deleted section, \'trashed\' is added to the"
Preventing Future Issues
- Regular Backups: Maintain regular backups of your WordPress site.
- Plugin Awareness: Be cautious when installing new plugins, and test them in a staging environment first.
- Careful Permalinks: Pay close attention when editing permalinks, especially after deleting and restoring posts/pages.
If you\'re still struggling with the \'__trashed 12\' issue, seeking assistance from a WordPress developer or consulting WordPress support forums is recommended. Remember to provide details about your setup, including installed plugins and theme.
If you are seeing an error message \'__trashed 2\' instead of the page you expect, the solutions provided above should still apply. Si te encuentras con el problema de que tu página web muestra un mensaje de error «__trashed 2» y no está disponible, no te preocupes, ¡aquí te presento una solución