The Elementor Website Builder has it all: drag and drop page builder, pixel perfect design, mobile responsive editing,…
About Disable Media Pages
This plugin disables "attachment" pages created by WordPress, which can negatively affect your SEO and cause issues with slug reservation. It works by setting all attachment slugs to a unique ID and displaying a 404 error page when an attachment page is accessed. The plugin also supports WP CLI and is recommended over the built-in feature in WordPress 6.4.Changelog
3.1.3 (2024‐07‐25)
- Fix: Tested in WP 6.6
3.1.2 (2024‐04‐04)
- Fix: Tested in WP 6.5
3.1.1 (2024‐03‐26)
- Fix: Removed unnecessary debugging statements
- Fix: improve readme formatting
3.1.0 (2024‐03‐24)
- Feature: Add WP CLI support
3.0.5 (2023‐11‐09)
- Update readme
3.0.4 (2023‐11‐09)
- Fix: WordPress 6.4 compatibility.
-
Note for WordPress 6.4
WordPress 6.4 includes a new feature that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages.
Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. You can follow the progress of this issue on WordPress Trac.
Also, there is no user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites.
Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use.
3.0.3 (2023‐09‐26)
- Fix: Improved randomness in UUIDv4 generation
3.0.2 (2023‐08‐10)
- Fix: Tested in WP 6.3
3.0.1 (2023-06-15)
- Fix: Fix typo
3.0.0 (2023-06-15)
- Fix: Tested in WordPress 6.2
- Breaking change: Dropped support for WordPress 5.0, WordPress 5.1, and PHP 7.0. The Debian version in the Docker images is so old it no longer works properly and crashes the build. This makes it very difficult to run tests. New minimum PHP version is 7.1 and minimum WordPress version is 5.2.
2.0.3 (2022-12-11)
- Fix: Fix typo. Thanks to porg for noticing this!
2.0.2 (2022-10-31)
- Fix: Test in WP 6.1
2.0.1 (2022-07-26)
- Fix: small update to readme
2.0.0 (2022-07-25)
- Breaking change: fixed how the plugin hooks into the
redirect_canonicalaction. Because the plugin didn’t return a value from this filter, this caused the plugin to change default WordPress behaviour (eg. https://example.com/index.php did not redirect to https://example.com/ like with a normal WordPress installation). In this version the filter returns the value which restores this WordPress default functionality. I’m making this a major release because it changes the plugin behaviour, so I recommend testing your site in a development or staging environment before updating your production site. For more information, see this support thread.
1.3.0 (2022-06-03)
- Feature: Improved slug generation logic. Now the plugin checks the slug is in UUIDv4 format before generating a new slug. This prevents slugs from changing when saving a post.
1.2.3 (2022-05-25)
- Fix: Test in WP 6.0
1.2.2 (2022-02-05)
- Fix: Add missing localization string
- Fix: Minor readme updates
- Fix: Optimize acceptance test database size
1.2.1 (2022-01-28)
- Fix: Fix typo
1.2.0 (2022-01-28)
- Feature: Improved plugin code structure
- Feature: Add donate link
- Fix: Readme update
- Fix: Fix issue where the plugin was unable to mangle slugs that contained UUID along with some other text
1.1.3 (2022-01-28)
- Fix: Bump supported WordPress version to 5.9
- Fix: Readme updates
- Fix: Add automated test for slug restore functionality
1.1.2 (2022-01-19)
- Fix: Remove debugging statements
- Fix: Fix typo in readme
1.1.1 (2022-01-06)
- Fix: Minor fix to the icon
1.1.0 (2022-01-06)
- Feature: Add a tool for restoring media slugs back to the original ones
- Feature: Add status page for the plugin which tells you if you have attachments without unique ids
- Fix: Add menu for the plugin under Settings on the WordPress dashboard
- Fix: Update plugin icon
1.0.8 (2021-07-24)
- Fix: Bump supported WordPress version to 5.8
- Fix: Update dependencies
1.0.7 (2021-06-14)
- Fix: Update dependencies
- Fix: Update FAQ
- Fix: Tweak icon
1.0.6 (2021-06-09)
- Fix: Fix issue with deployment
1.0.5 (2021-06-09)
- Fix: Bump tested up to @ 5.7
- Fix: Add acceptance tests
1.0.4 (2021-01-02)
- Change: Add icon
1.0.3 (2020-12-31)
- Fix: Change required WordPress version correctly to 5.0
- Fix: Optimize autoloader
1.0.2 (2020-12-31)
- Change: Release on WordPress plugin directory
- Change: Changes to internal plugin structure
- Fix: Make plugin translatable
- Fix: Load JavaScript and CSS only on plugin page
1.0.1 (2020-12-19)
- Fix: WordPress 5.6 compatibility, thanks @tnottu
1.0.0 (2020-09-26)
- Initial release