WordPress Release: 5.4.2

Tag Name: 5.4.2

Release Date: 6/10/2020

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 5.4.2 is a maintenance and security release that addresses several issues across the core platform and bundled themes. This update includes important security fixes that prevent unmoderated comments from being indexed by search engines, improve redirect validation, and enhance protection for private posts. It also fixes numerous UI and functionality bugs in the Twenty Twenty and other bundled themes, restores a previously deprecated taxonomy filter, and improves the developer experience with Docker tools. This release is recommended for all WordPress sites to maintain security and ensure proper functionality.

Highlight of the Release

    • Important security fix to prevent unmoderated comments from being indexed by search engines
    • Enhanced security with improved validation of redirects
    • Restored the previously deprecated tag_row_actions filter for taxonomy list tables
    • Multiple UI and functionality fixes for Twenty Twenty and other bundled themes
    • Added "Block Editor Styles" and "Wide Blocks" to the list of WordPress theme features
    • New Docker environment restart command for easier local development

Migration Guide

WordPress 5.4.2 is a maintenance and security release that doesn't introduce breaking changes requiring specific migration steps. The update process follows the standard WordPress update procedure:

  1. Backup your site: Always create a complete backup of your files and database before updating.

  2. Update via Dashboard: Navigate to Dashboard > Updates and click "Update Now" or use the automatic update feature.

  3. Alternative Update Methods: If needed, you can also update manually via FTP or using WP-CLI with the command wp core update.

Developer Notes

  • If you were relying on the previously deprecated tag_row_actions filter, note that it has been restored and is now available again.

  • If you're registering REST API routes, ensure you're using proper namespacing. The update now enforces correct namespacing while providing appropriate notices for incorrect implementations.

  • If you're developing with the local Docker environment, you can now use the new env:restart command for easier environment restarts.

Upgrade Recommendations

Recommendation: Immediate upgrade recommended for all WordPress sites

WordPress 5.4.2 contains important security fixes that protect against potential vulnerabilities, particularly related to comment visibility and redirect validation. These security enhancements alone make this update highly recommended for all WordPress installations.

The release also addresses numerous bugs in the core platform and bundled themes that improve the overall stability and user experience of your WordPress site.

Given the security nature of some of the fixes, we strongly recommend updating to WordPress 5.4.2 as soon as possible. The update process is straightforward and shouldn't cause any compatibility issues with existing themes or plugins.

For sites with heavy customizations or critical business functions, as always, it's recommended to test the update in a staging environment first before applying to your production site.

Bug Fixes

Core Fixes

  • Fixed an issue where the default site icon was loading from the wp-admin directory, which may not be publicly available. It now loads from the wp-includes directory.
  • Restored (un-deprecated) the tag_row_actions filter for taxonomy list tables, providing a simple way for plugin authors to add actions generically.
  • Fixed heading hierarchy in the Help/About section by moving the changelog for WordPress 5.4.1 after the main heading.
  • Ensured proper namespacing when registering REST API routes, with appropriate error notices for incorrect implementations.
  • Fixed HTML decoding issues by setting the proper editor context.
  • Ensured that broken theme names are returned properly.

Theme Fixes

  • Twenty Twenty:

    • Fixed submenu items disappearing underneath the Cover block by increasing the z-index value.
    • Fixed image caption alignment when images are centered.
    • Fixed anchor links in the mobile menu to properly close the modal and scroll to the anchor.
    • Fixed custom post types showing author boxes even when they don't support authors.
    • Fixed inconsistent margins for .alignwide and .alignfull elements, including RTL styles.
    • Added missing RTL styles for proper margin handling.
    • Fixed a typo in readme.txt (TikTok was misspelled as "Tik Tok").
  • Twenty Nineteen:

    • Fixed center and right-aligned heading accents that appeared broken.
    • Decreased the font size for widget titles for better visual hierarchy.
  • Twenty Eleven & Twenty Twelve:

    • Fixed dropdown category widget exceeding parent div when strings are long by limiting width with max-width: 100%.

Editor and UI Fixes

  • Removed CSS exceptions for the "Select plugin/theme to edit" and documentation "Look Up" buttons in the File Editor.
  • Fixed inline images in list blocks not being positioned correctly in Twenty Twenty theme.
  • Ensured that the title attribute is set correctly on embeds.

New Features

and Enhancements

  • Theme Features: Added "Block Editor Styles" and "Wide Blocks" to the list of WordPress theme features, which were previously only available in the Theme Directory API.

  • Development Environment: Introduced a new env:restart command for easier restarting of the local Docker environment, improving the developer experience.

  • Social Icons: Added support for TikTok and Google My Business (g.page) links in the Twenty Twenty theme's social icon menu with GPL-compatible icons.

  • Admin Customization: Added a new filter to extend set-screen-option functionality, providing more flexibility for plugin developers.

Security Updates

  • Comment Protection: Enhanced security by ensuring that unmoderated comments won't be indexed by search engines. After a comment is submitted, there's now only a brief window where the comment is live on the site before requiring moderation.

  • Redirect Validation: Improved wp_validate_redirect() function to sanitize a wider variety of characters, preventing potential security issues with malformed redirects.

  • Private Content Protection: Ensured that latest comments can only be viewed from public posts, preventing potential exposure of comments on private content.

Performance Improvements

No significant performance improvements were specifically mentioned in this release. The focus of WordPress 5.4.2 was primarily on security enhancements and bug fixes rather than performance optimizations.

Impact Summary

WordPress 5.4.2 is primarily a security and maintenance release that addresses several important issues across the platform. The most significant impact comes from the security enhancements, particularly the protection against search engines indexing unmoderated comments and improved redirect validation.

For site administrators, this update provides peace of mind with enhanced security measures and fixes for various UI issues in the admin interface. The restoration of the tag_row_actions filter is particularly beneficial for developers who rely on this hook for extending taxonomy functionality.

Content creators will benefit from numerous fixes in the bundled themes, especially Twenty Twenty, which received the most attention in this release. Issues with image captions, submenu visibility, and block alignment have been resolved, providing a more consistent and polished publishing experience.

Developers gain improved tools with the new Docker environment command and better REST API route handling. The addition of "Block Editor Styles" and "Wide Blocks" to the list of WordPress theme features also provides more standardized ways to declare theme capabilities.

Overall, this release maintains WordPress's commitment to security and stability while addressing specific pain points reported by the community. The changes are focused on refinement rather than introducing new features, making it a straightforward but important update for all WordPress sites.

Statistics:

File Changed42
Line Additions484
Line Deletions83
Line Changes567
Total Commits36

User Affected:

  • Enhanced security with improved validation of redirects
  • Fixed issue with default site icon loading from the correct directory
  • Better protection against search engines indexing unmoderated comments
  • Improved Site Health checks to avoid PHP notices

Contributors:

desrosjSergeyBiryukovwhyisjake