Overview

Click to expand overview
en WordPress.com Forums How did all these extra words start appearing in this URL? How did all these extra words start appearing in this URL? sleepiergirl A Wordpress site of mine seems to have changed some of my pages permalinks by adding __trashed after the slug. Note that not all pages are affected, neither do other post types. The 'add_trashed_suffix_to_trashed_posts' PHP filter in WordPress adds a suffix to trashed posts' slugs, preventing conflicts with existing post URLs. Once a page or post has been deleted and restored the URL will be locked, with a value of __trashed. Sometimes published posts randomly get __trashed added in their URL, at random times, without actually ever being put in the trash. We also don’t have pages in the After I made my site go live, I realized that one of the page url’s carried the words “__trashed-2/” on the end. It is a child page under a drop down menu and does not 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 __trashedが表示されるのは「ゴミ箱」にページが入っている時です。 そのため、ゴミ箱から 「完全に削除」 をすることで、完全に表示されないようにすることがで 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 Filters whether or not to add a __trashed suffix to trashed posts that match the name of the updated post.

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.
  • 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

Top Sources

Related Articles