WordPress plugin intelligence profile

Disable Media Pages

Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version4.0.3
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.0 · PHP 8.0
Directory statusactive
Last directory update18 Sept 20261mo ago
Active installations10K+Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 17 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Disable Media Pages version 4.0.3 as active, updated 1mo ago and tested up to WordPress 7.1.

Overview

About this plugin

Completely disable “attachment” pages created by WordPress.

By default, WordPress creates a page for each of your attachments. This is can be undesirable because of two reasons:

Search engine optimization

Attachment pages don’t have any content, except an image, so they provide little value and can negatively affect your SEO because they are so-called thin content. Even worse, attachment pages may in some cases rank higher than your actual content pages which leads to a poor user experience.

Reserved slugs

Attachment pages can accidentally reserve slugs on your site. com/contact is automatically created. com/contact-2 which isn’t that great.

How it works

This plugin works by automatically setting all attachment slugs to an unique id, so they won’t conflict with your pages. If an attachment page is accessed, the plugin will set a 404 status code and display the “page not found” template.

You can also mangle any existing attachment slugs so they won’t cause any issues in the future.

WP CLI support

The plugin supports WP CLI.

Mangle existing attachment slugs

wp disable-media-pages mangle

Restore attachment slugs

wp disable-media-pages restore

Note for WordPress 6.4

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.

4 feature also does not fix the issue where attachment pages reserve slugs for pages.

Also, there is not 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.

Thanks

Special thanks to Greg Schoppe for his research and inspiration that helped a lot with developing this plugin.

Support the plugin

Maintaining a WordPress plugin is a lot of work. org. You can also support me on GitHub sponsors.

Thank you!

If you are interested, you can also check out my other WordPress plugins:

  • Disable Customizer
  • Disable Drop Cap
  • ACF Image Aspect Ratio Crop
WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • attachment
  • hide
  • image
  • permalink
  • remove
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.0 · PHP 8.0
Update activity18 Sept 20261mo ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

Version4.0.04.0.3
WordPress compatibility6.8.87.1.1
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.