WordPress Release: 6.2.0

Tag Name: 6.2.0

Release Date: 3/29/2023

WordPress LogoWordPress

World's most popular open-source content management system powering over 40% of all websites. Offers extensive plugin ecosystem, themes, and robust community support for blogs, e-commerce, and corporate websites. Highly customizable and scalable platform suitable for beginners and advanced developers.

TL;DR

WordPress 6.2 "Dolphy" introduces significant enhancements to the block editor and site editing experience. This release focuses on improving design tools, performance, and accessibility while adding new features like the Style Book, sticky positioning, and enhanced navigation. The update also includes numerous bug fixes, security improvements, and developer-focused enhancements that make WordPress more powerful and user-friendly.

Highlight of the Release

    • New Style Book feature for previewing design changes across different block types
    • Enhanced site editor with improved template management and navigation
    • Sticky positioning support for blocks to create more engaging layouts
    • New HTML Tag Processor API for safer and more efficient HTML manipulation
    • Improved performance with optimized database queries and better caching
    • Local font hosting in bundled themes for better privacy and performance
    • Enhanced design tools with more options for borders, spacing, and typography
    • Better accessibility with improved keyboard navigation and screen reader support

Migration Guide

Preparing for WordPress 6.2

Before Updating

  1. Create a complete backup of your WordPress site, including database and files
  2. Update all themes and plugins to their latest versions
  3. Test in a staging environment if possible, especially if you use custom themes or plugins
  4. Review deprecated functions that might be used in your custom code

PHP Compatibility

WordPress 6.2 maintains the same PHP requirements as previous versions, requiring PHP 5.6 or higher. However, for optimal security and performance, it's recommended to use PHP 7.4 or higher.

Theme Developers

If you maintain a custom theme:

  1. Test with the block editor: Ensure your theme works properly with the enhanced block editor
  2. Review block styles: Check that your theme's styles work correctly with the new block features
  3. Test template parts: If using block templates, test that template parts work correctly with the new site editor
  4. Consider local fonts: Review the implementation of local font hosting in bundled themes as a reference

Plugin Developers

If you maintain plugins:

  1. Test with the HTML Tag Processor API: If your plugin manipulates HTML, consider using the new HTML Tag Processor API
  2. Review block compatibility: Ensure your blocks work correctly with the new block-level settings
  3. Test with the enhanced site editor: If your plugin interacts with the site editor, test thoroughly
  4. Check for deprecated functions: Review any usage of functions that might be deprecated

Known Issues

  • Some third-party plugins may need updates to be fully compatible with the new block editor features
  • Custom blocks might need adjustments to work properly with the new block-level settings
  • Themes that heavily customize the editor might need updates to maintain compatibility

Upgrade Recommendations

Recommended Action: Upgrade to WordPress 6.2 at your earliest convenience.

WordPress 6.2 is a major release that brings significant improvements to the block editor, site editing experience, and overall performance. The update includes important security fixes, bug fixes, and new features that enhance both the user experience and developer capabilities.

Priority Level: Medium-High

This update is recommended for all WordPress sites due to:

  • Important security enhancements
  • Significant performance improvements
  • Bug fixes that address issues in previous versions
  • Enhanced editing capabilities that improve content creation

Considerations Before Upgrading:

  1. Testing: As with any major release, testing in a staging environment is recommended, especially if you use custom themes or plugins.

  2. Plugin Compatibility: Some plugins may need updates to be fully compatible with the new features. Check for updates to your plugins before upgrading.

  3. Theme Compatibility: If you use a custom theme, ensure it's compatible with the enhanced block editor and site editing features.

  4. Custom Code: If you have custom code that interacts with the block editor or site editor, review it for compatibility with the new APIs and features.

Upgrade Path:

For most sites, the standard WordPress update process will work smoothly. However, sites with complex customizations should follow a more cautious approach:

  1. Create a complete backup
  2. Update in a staging environment first
  3. Test thoroughly before updating the production site
  4. Schedule the update during a low-traffic period

The improvements in WordPress 6.2, particularly in performance and editing capabilities, make this update valuable for most WordPress sites.

Bug Fixes

Editor & Blocks

  • Fixed issue where the file block button styles were not properly displayed in classic themes
  • Resolved a bug where non-sticky posts were included in Query Loop Block when set to "Only" sticky posts
  • Fixed a regression where changes to a parent theme's template part were not saved in the Site Editor
  • Corrected an issue with the Gallery block where layout classes were incorrectly applied

Media

  • Fixed focus loss when updating custom fields in the media modal
  • Improved display of cropped images in the media editor
  • Resolved an issue where Imagick operations could silently error by timeout
  • Fixed unwanted quotation marks in playlist template

Performance & Caching

  • Implemented wp_cache_get_multiple in wp_queue_posts_for_term_meta_lazyload for better performance
  • Fixed an issue with LCP (Largest Contentful Paint) image detection in block themes
  • Resolved various caching issues for better performance

Accessibility & UI

  • Fixed admin menu not closing when focus moves to body
  • Corrected false positive on automated contrast testing in the toolbar
  • Fixed JavaScript test failure in administration
  • Resolved PHP warnings in Twenty Twenty theme due to incorrect usage of wp_add_inline_style()

New Features

Enhanced Site Editor

  • Style Book: Preview design changes across different block types in real-time
  • Template Management: Improved interface for managing templates and template parts
  • Global Styles: Enhanced interface with more design options and better organization

Block Enhancements

  • Sticky Positioning: New block support for sticky positioning to create more engaging layouts
  • Block-level Settings: Support for block-level settings to define preset settings for nested blocks
  • Enhanced Navigation Block: Improved UI and functionality for the navigation block

Developer Tools

  • HTML Tag Processor API: New API for safer and more efficient HTML manipulation
  • Search Columns: New search_columns argument for WP_Query to control which fields are searched
  • Block Development: Enhanced tools and APIs for block development

Performance & Security

  • Optimized Database Queries: Improved performance with better database query handling
  • Local Font Hosting: Bundled themes now host Google Fonts locally for better privacy and performance
  • Security Enhancements: Various security improvements throughout the codebase

Security Updates

Input Validation & Sanitization

  • Added protection for wp_strip_all_tags() against fatal errors introduced in PHP 8, retaining the E_USER_WARNING from PHP 7, and preventing PHP 8.1 deprecation notices when passing null
  • Improved validation in WP_Http::make_absolute_url() to prevent it from dropping URL fragments
  • Enhanced security in comment handling to prevent replying to unapproved comments

Authentication & Authorization

  • Fixed confirmation link for multisite users with no role
  • Improved Recovery Mode by using PasswordHash API directly when validating keys
  • Enhanced security in user authentication processes

Data Protection

  • Added rel="privacy-policy" to Privacy Policy links for better discoverability by user agents and HTML parsers
  • Improved handling of sensitive data in various WordPress components
  • Enhanced security in media handling and file operations

General Security Improvements

  • Updated jQuery to version 3.6.4 to address security vulnerabilities
  • Fixed various potential security issues throughout the codebase
  • Improved error handling and validation in multiple components

Performance Improvements

Database Optimization

  • Implemented wp_cache_get_multiple in wp_queue_posts_for_term_meta_lazyload function, allowing for multiple cache keys to be received from cache in a single function call, significantly improving performance on sites with object caching
  • Optimized taxonomy relationship queries for multiple posts

Media & Assets

  • Enhanced logic to determine LCP (Largest Contentful Paint) image in block themes and avoid lazy-loading it, improving Core Web Vitals scores
  • Added optimization to avoid lazy-loading images in the header block template part, making lazy-loading heuristics more accurate for sites using block themes
  • Improved image handling in Imagick operations with new set_imagick_time_limit() method to avoid timeouts

Resource Loading

  • Bundled Google Fonts locally in all default themes (Twenty Twenty-Three through Twenty Twelve), eliminating external requests and improving privacy and performance
  • Optimized block library loading with better conditional enqueuing of styles
  • Improved JavaScript asset loading and execution

General Optimizations

  • Added checks to avoid unnecessary operations when set_time_limit() function is disabled
  • Improved error handling and resource management throughout the codebase
  • Enhanced caching mechanisms for various WordPress components

Impact Summary

WordPress 6.2 "Dolphy" represents a significant evolution in the WordPress editing experience, focusing on design flexibility, performance, and developer tools. This release builds upon the site editing capabilities introduced in previous versions, making them more intuitive and powerful.

The introduction of the Style Book feature transforms how users can preview and apply design changes across their sites, allowing for more consistent and efficient styling. The enhanced site editor with improved template management gives users greater control over their site's structure and appearance.

Performance improvements are a key highlight of this release, with optimized database queries, better caching mechanisms, and local font hosting in bundled themes. These changes contribute to faster page loads and a more responsive editing experience.

For developers, the new HTML Tag Processor API provides a safer and more efficient way to manipulate HTML, while the addition of block-level settings and other enhancements expand the possibilities for block development.

Accessibility continues to be a focus, with improvements to keyboard navigation, screen reader support, and color contrast throughout the interface.

Security enhancements, including better input validation and protection against PHP 8 issues, make WordPress 6.2 a more secure platform for websites of all sizes.

Overall, WordPress 6.2 delivers a more refined, performant, and accessible content creation experience while providing developers with powerful new tools to extend WordPress functionality.

Statistics:

File Changed300
Line Additions11,488
Line Deletions6,702
Line Changes18,190
Total Commits250

User Affected:

  • Enhanced block editor with improved design tools and interface
  • New Style Book feature for previewing design changes across different blocks
  • Better navigation block with improved UI and functionality
  • Sticky positioning for blocks to create more engaging layouts
  • Improved media handling and editing capabilities

Contributors:

peterwilsonccyouknowriadaudrasjbspacedmonkeyjorgefilipecostaSergeyBiryukovdesrosjjoedolsondream-encodedanielbachhuberfelixarntzjohnbillionaaronjorbinhellofromtonyaswissspidyhelenazaozzadamsilversteinTimothyBJacobsgzioloocean90ryellejoemcgill