Send attachment pages to the file
Each uploaded image has its own thin page (…/image-name/). This sends visitors straight to the file instead, as new WordPress sites do.
<?php
// The same setting WordPress 6.4+ uses on new sites.
add_filter( 'pre_option_wp_attachment_pages_enabled', static fn() => '0' );
In these packs
- Turn off what you don’t use: Each of these replaces a small plugin: no comments, classic editor, no feeds, no search and more.