WordPress Release: 5.6.2
Tag Name: 5.6.2
Release Date: 2/22/2021
WordPressWorld'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 5.6.2 is a maintenance release that addresses several bugs and improves compatibility with PHP 8. Key fixes include resolving a PHP 8 fatal error in the PclZip library, correcting the "Are you sure?" prompt when navigating away from the classic editor, and updating multiple block editor packages to their latest patch versions. This release also includes several build and testing tool improvements to enhance the development workflow.
Highlight of the Release
- Fixed a PHP 8 fatal error in the PclZip library by ensuring fread() is only called on non-empty files
- Corrected the 'Are you sure?' prompt behavior when navigating away from the classic editor
- Updated multiple block editor packages to their latest patch versions
- Switched from node-sass to Dart Sass for better build tool maintenance
- Improved Node.js version specification and testing workflows
Migration Guide
Upgrading to WordPress 5.6.2
This is a maintenance release with no breaking changes, so no special migration steps are required. Standard WordPress update procedures apply:
- Back up your website before updating
- Update through the WordPress admin dashboard or via your preferred method
- Test your site functionality after the update
For Developers
If you're working on the WordPress codebase:
- Note that the build tools now use Dart Sass instead of node-sass
- NodeJS 14.x is now specified in the
.nvmrcfile for the 5.6 branch - The
package.jsonfile now includes version ranges fornodeandnpmin theenginesfield - If you're using the local Docker environment, you can now replace
mysqlwithmariadbfor consistency
Upgrade Recommendations
WordPress 5.6.2 is a recommended update for all WordPress sites, especially for those running on PHP 8 or planning to upgrade to PHP 8. The release fixes a critical PHP 8 compatibility issue in the PclZip library that could cause fatal errors.
Content creators will benefit from the fixes to the classic editor's "Are you sure?" prompt behavior and the various block editor improvements.
As this is a maintenance release with bug fixes and compatibility improvements, there are no known risks associated with upgrading. Standard precautions apply:
- Create a full backup of your site before updating
- Test your site thoroughly after the update
- If you use custom themes or plugins, ensure they are compatible with this version
The update process is straightforward and can be performed through the WordPress admin dashboard.
Bug Fixes
PHP 8 Compatibility Fix
- Fixed a fatal error in the PclZip library by ensuring
fread()is only called on non-empty files, avoiding passing a zero value to the$lengthargument which must be greater than zero in PHP 8
Editor Improvements
- Corrected the check for unsaved content in
wp.autosave.server.postChanged()to fix improper triggering of the "Are you sure?" prompt when navigating away from the classic Edit Post screen - Fixed handling of Pages and custom post types that don't have a Title, Content, or Excerpt field
Block Editor Package Updates
Updated several packages to their latest patch versions to fix bugs:
@wordpress/block-directoryto1.17.8@wordpress/block-editorto5.1.7@wordpress/block-libraryto2.26.8@wordpress/componentsto11.1.5@wordpress/core-datato2.24.4@wordpress/edit-postto3.25.8@wordpress/editorto9.24.7@wordpress/format-libraryto1.25.7@wordpress/list-reusable-blocksto1.24.5@wordpress/media-utilsto1.18.1@wordpress/nuxto3.23.5@wordpress/reusable-blocksto1.0.7@wordpress/server-side-renderto1.19.5
New Features
Build Tool Improvements
- Replaced node-sass with Dart Sass as the Sass implementation used by Grunt, since LibSass & node-sass have been deprecated
- Added clearer version range specifications within
enginesfornodeandnpmin package.json - Pinned NodeJS 14.x in the
.nvmrcfile for better version control - Updated the version of NodeJS tested on Windows to 14
- Added ability to replace
mysqlwithmariadbwhen using the local Docker environment
Testing Workflow Enhancements
- Merged several refinements to GitHub Action workflow files
- Added support for running automated tests when tags are created
- Refined the matched version ranges for several workflows
Security Updates
No specific security fixes were mentioned in the release notes for WordPress 5.6.2.
Performance Improvements
Build Performance
- The switch from node-sass to Dart Sass provides a more actively maintained and potentially faster Sass implementation
- Improved Node.js version specifications help ensure optimal build performance by using compatible versions
- Enhanced GitHub Actions workflows for more efficient automated testing
Editor Performance
- Multiple block editor package updates include performance improvements and optimizations
- Fixed issues that could cause unnecessary prompts and page reloads in the classic editor
Impact Summary
WordPress 5.6.2 is primarily a maintenance and bug fix release that addresses several important issues:
-
PHP 8 Compatibility: The most significant fix addresses a fatal error in the PclZip library when running on PHP 8, making WordPress more stable on newer PHP versions.
-
Editor Experience: The release fixes an annoying issue where users would get unnecessary "Are you sure?" prompts when navigating away from the classic editor even when no changes were made, particularly affecting custom post types.
-
Block Editor Improvements: Multiple block editor packages were updated to their latest patch versions, addressing various bugs and improving the editing experience.
-
Developer Tooling: Several improvements to build tools and testing workflows make WordPress development more efficient, including the switch from node-sass to Dart Sass and better Node.js version specifications.
This release doesn't introduce new features but focuses on stability and compatibility. Site administrators should update to ensure better PHP 8 compatibility and a smoother editing experience for content creators. The changes are backward compatible and shouldn't cause any disruption to existing sites.
Statistics:
User Affected:
- Improved build tools with the switch from node-sass to Dart Sass
- Better Node.js version specification in package.json and .nvmrc files
- Enhanced automated testing workflows, including support for running tests when tags are created
- Fixed PHP 8 compatibility issues in the PclZip library
