What website owners need to know about WordPress 6.3

Yesterday was launch day for the latest update to WordPress, codenamed “Lionel”. You can read the news directly from the team themselves.

This has been a long time in the making, and alongside the release of 6.2 marks the end of the Gutenberg project’s second phase.

WordPress 6.3 New Features

  • Site editor improvements
    • Redesigned site editor navigation
    • Preview block themes before applying them
    • Custom colours + styles, including gradients, without needing to access the code
    • Historical style changes – see how your website used to look
    • Navigation block can be customized externally
    • Improved padding + margin interface
      • Select just vertical or horizontal dimensions (screenshots below)
  • Several Additional features
    • Command Palette
    • Block patterns editor, which can be synchronized – this previously referred to as “reusable blocks”
    • Automatically restore previously installed version of plugins or themes if something goes wrong during update
  • Two additional blocks
  • Some additional block settings
    • Cover block has layout controls + border options
    • Image block – we can select aspect ratios now

Site Editor Improvements

Improved Editor Navigation

The rest of the interface is eventually going to look like this.

wordpress-6-3-site-editor-1


Padding and Margin is Redesigned

wordpress-6-3-dimensions-1wordpress-6-3-dimensions-2

What Developers Need to Know

If you’ve never tampered with the wp-config.php folder, you should probably skip this section.

PHP 5 is Discontinued

Simply, ensure that the website host server is utilizing at least version 7 before updating WordPress or you may end up with a nasty surprise. Ideally you’re already running at least 7.4, if not 8, anyway.

Development Mode

A new constant has been created to specify the current website type.

  • WP_DEVELOPMENT_MODE constant
    • Potential value: core, plugin, theme, all, or empty string
  • New functions
    • wp_is_development_mode( $mode )
    • wp_get_development_mode()
  • You can view the development mode under ToolsSite HealthInfo (within the WordPress Constants section)

Multiple Performance Improvements

  • Scripts can be deferred and / or loaded asynchronously (explained in scripts API change section below)
  • Fetch priority for images
    • Automatically adds fetchpriority="high" for the image most likely considered to be the most important image on the page
  • Lazy loading for images
  • Disable emoji

Check Your Login + Registration Forms – Passwords Are Now Required

The standard user access forms now include the required attribute for both the username and password text input fields. If you have code (theme or plugin) that changes the user access fields, you may need to adapt your code for this.

Block Layout Is No Longer Experimental

In a theme’s block.json file, there may be some code like this:

"supports": {
  "__experimentalLayout": true
}

It now needs to look like this:

"supports": {
  "layout": true
}

WordPress will continue to support both names for a while, but it is recommended to fix for all custom blocks.

Remove Layout Definitions

If your theme.json file includes a value at settings.layout.definitions, you will need to remove it.

This affects anyone who used the Create Block Theme plugin.

API Change for Enqueuing Scripts

We’ve all had a bit of fun manipulating the wp_enqueue_script() function to do what we want for better performance.

Normally, the $in_footer argument in the wp_enqueue_script() function, is a bool (true or false) value, but this has been changed to an $args object which can either be a bool or array. Like so:

$args = array(
  'in_footer' => true,
  'strategy => 'async',
);

wp_enqueue_script( $handle, $src, $deps, $ver, $args);

Note that only the underlying functionality hasn’t been implemented yet, so the performance improvements gained from changing this will not be felt yet.

Fix Image Loading Code

Lazily loading images dropped in WordPress 5.5 but there have been some changes to it in version 6.3.

There were some changes to the WordPress core to handle fetch prioritization and lazy loading, so if you have code relying on the core’s lazy-loading logic, you will need to make changes.

The function wp_get_loading_attr_default() has been removed and superseded by wp_get_loading_optimization_attributes().

Note that there is also a new function wp_omit_loading_attr_threshold().

References