WordPress 6.8: New Features and Developer Changes

WordPress 6.8 for developers: speculative loading, bcrypt and the style book

WordPress 6.8 (April 2025) was a polishing release for the editor, with two changes under the hood that affect every site: speculative loading, which prefetches pages before the visitor clicks, and bcrypt as the new password hashing algorithm. Both are on by default, and both can matter for plugins: one for pages that must not be prefetched, the other for code that reads password hashes.

Problem: A shop updated to 6.8. The analytics show more page views without a matching increase in visitors, a plugin with “one-click” links (add to cart, logout) triggers actions too early, and an old single sign-on bridge that compares password hashes stopped working for users who logged in after the update.

Solution: Exclude URLs with side effects from speculative loading with the wp_speculation_rules_href_exclude_paths filter and keep actions on POST requests or nonce-protected links, make analytics ignore prefetches, and use wp_check_password() instead of comparing hashes directly.

Speculative loading

WordPress 6.8 prints speculation rules (a JSON script tag) that tell supporting browsers (Chrome, Edge) to prefetch a same-site link when the visitor starts clicking it (eagerness: conservative, pointer down). The next page is often ready when the click finishes. It applies to logged-out visitors on sites with pretty permalinks; wp-admin, wp-login.php, links with query strings and links marked rel="nofollow" are excluded by default.

add_filter( 'wp_speculation_rules_href_exclude_paths', function ( array $paths ): array {
    $paths[] = '/cart/*';
    $paths[] = '/my-account/customer-logout/*';
    $paths[] = '/ha-download/*';
    return $paths;
} );

add_filter( 'wp_speculation_rules_configuration', function ( ?array $config ): ?array {
    if ( is_array( $config ) ) {
        $config['mode']      = 'prefetch';
        $config['eagerness'] = 'moderate'; // also on hover after a short delay
    }
    return $config;
} );

A link that changes data on GET (a logout link, a “delete” link, a download counter) is a bug anyway, and prefetching makes it visible. Server-side analytics see prefetch requests with the header Sec-Purpose: prefetch and should skip them; JavaScript analytics run only when the page is actually shown.

bcrypt password hashes

WordPress 6.8 hashes new passwords with bcrypt through PHP’s password_hash(), with a $wp$2y$ prefix, instead of the old phpass hashes that start with $P$. Existing hashes keep working and are rehashed at the next login. Application passwords and other generated keys use BLAKE2b through Sodium.

// wrong: compares hashes directly, breaks with every algorithm change
$ok = ( $user->user_pass === ha_legacy_hash( $password ) );

// right: works for phpass, bcrypt and whatever comes next
$ok = wp_check_password( $password, $user->user_pass, $user->ID );

Code that only uses wp_check_password(), wp_hash_password() and wp_set_password() needs no change. External systems that verify WordPress hashes themselves (old SSO bridges, migration scripts) must understand the new format: strip the $wp prefix and verify with bcrypt after applying the same pre-hash WordPress uses, or better, call WordPress for the check.

The Style Book for classic themes

The Style Book, a page that shows every block with the site’s styles, is available for classic themes that support editor-styles or have a theme.json, under Appearance. It is a quick way to check that a classic theme’s editor styles match the front end before converting the theme.

NOTE: WordPress 6.9 followed in December 2025. For the release before: WordPress 6.7 for developers. Speculative loading started as a Performance Lab feature plugin, which remains useful for testing prerendering (mode: prerender) instead of prefetching.