WordPress 6.1 is scheduled to be released on the 1st of November and contains many feature improvements.
Database queries made using WP_Query will now be cached by default in WordPress 6.1.
To disable caching globally on query improvements (extreme case), use this code snippet;
function disable_caching( $wp_query ) {
$wp_query->query_vars['cache_results'] = false;
}
add_action( 'parse_query', 'disable_caching' );
Also, in the WordPress 6.1 release, new cache checks are being added to the site health, and a new filter was added so that you can suggest persistent object caching and change the link in the check for caching in site health.
In the site health report in wp-admin opt-in to suggest object caching;
add_filter( 'site_status_should_suggest_persistent_object_cache', '__return_true' );
To change the WordPress URL link to your link for a client;
add_filter( 'site_status_persistent_object_cache_url', function() {
return 'https://sitedomain.com/optimization/persistent-object-cache';
} );
To disable new user email notifications to admin users, they can be disabled using the new filter added in WordPress 6.1.
add_filter( 'wp_send_new_user_notification_to_admin', '__return_false' );
To modify the lost password link HTML link wording, the new filter can be used in WordPress 6.1.
apply_filters( 'lost_password_html_link', $html_link );
(The WP.org docs will be updated soon for the correct code snippet)
You can insert these code snippets to multiple WordPress sites at once using the MainWP Code Snippet Extension.
Useful Links
- https://make.wordpress.org/core/6-1/
- https://make.wordpress.org/core/2022/10/12/wordpress-6-1-field-guide/
- https://make.wordpress.org/core/2022/10/11/performance-field-guide-for-wordpress-6-1/
- https://make.wordpress.org/core/2022/10/07/improvements-to-wp_query-performance-in-6-1/
- https://make.wordpress.org/core/2022/06/04/roadmap-to-6-1/