admin管理员组

文章数量:1122826

I got attacked by spammers that add comments/trackbacks/pings to my blog. I disabled everything, including old and new posts. But they found a way. I have no idea what it is. But it seems that every image have its own page.

/

How to delete those pages and remove disable comments/trackbacks completely?

I was searching but was not able to find what these pages are and how to access them from WP Admin.

Those pages should not exist.

I got attacked by spammers that add comments/trackbacks/pings to my blog. I disabled everything, including old and new posts. But they found a way. I have no idea what it is. But it seems that every image have its own page.

https://www.domektkaczki.pl/przysucha-ekspozycja-2/

How to delete those pages and remove disable comments/trackbacks completely?

I was searching but was not able to find what these pages are and how to access them from WP Admin.

Those pages should not exist.

Share Improve this question asked Jul 16, 2024 at 15:45 jcubicjcubic 1134 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

Those are attachments, all items in the media library are represented as posts of type attachment in the database, that's how WordPress knows which images/media you have and how it displays them. The media library isn't a file/folder viewer, and this is why copying an uploads folder or putting files in there manually won't fill the media library.

Since attachments are posts, this also means they have post meta/taxonomies/comments/authors/etc.

However this all changed in WordPress 6.4:

https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/

As of WordPress 6.4, attachment pages for new WordPress installations are fully disabled.

Until WordPress 6.4 was released, WordPress created attachment pages by default for every attachment uploaded. On the vast majority of sites, these attachment pages don’t add any meaningful information. They do, however, exist, get indexed by search engines, and sometimes even rank in search results, leading to bad results for users and site owners.

This change introduces a wp_attachment_pages_enabled database option to control the attachment pages’ behavior:

So to disable these, change the wp_attachment_pages_enabled option to 0 in the database.

Note that disabling attachment pages still means there are posts of type attachment in the database, that doesn't changes, it just means they don't have frontend pages/URL that you can visit or pretty permalinks. They "effectively" become a private/non-public post type.

本文标签: pingbacksHow to disable trackbacks and pings on Images