What’s New in WordPress 4.9

Updated on November 16, 2017

WordPress 4.9 “Tipton” has just been released and is available for download. The second major release of this year marks a significant step toward a more user-centric way to customize and manage websites, with great improvements to the Customizer, new exciting functionalities to widgets, a powerful text editor for editing code, and much more. So, it’s time to have a look at the most promising changes coming up with the new release.

You can download WordPress 4.9 or upgrade an existing install using from within your WordPress dashboard under the updates section. Remember, as with any new version of WordPress, it is always a good idea to test it in a staging environment first. Or at least take a backup in case something breaks.

That being said, let’s dive into the most promising WordPress 4.9 changes.

Drafting and Scheduling Changes in the Customizer

Inspired by drafting and revisions in the Customize Snapshots plugin, WordPress 4.9 introduces a new way to save changes in the Customizer. Any time you start a customization session, every change of settings will be saved in a customize_changeset custom post type. Thanks to changesets, user customizations can be saved as drafts or scheduled to be published in the future. This means that site admins can discard changes and restore the Customizer to the last published state before the final publication.

Customizer

Changes in the Customizer can be saved as drafts or scheduled to be published later

A useful addition is the Share Preview Link, which will allow users to share a preview of the latest changes with viewers who are not allowed to access the Customizer. The Share Preview Link will come in handy to share a preview of the front-end with your clients without giving them access to the admin panel.

Other UX Improvements in the Customizer

Other improvements concern the theme browsing experience. Since WordPress 4.9 the user can browse through installed themes and WordPress.org themes, and preview, download and activate them directly from the Customizer.

Customizer

Browsing through themes in the Customizer

Another change affects the flow for creating menus in the Customizer, and should solve some usability issues. Since WordPress 4.9 the user is guided through the menu creation process so that it should be more intuitive to select menu locations and items.

Customizer Menus sections

A comparison between Customizer Menus sections in WordPress 4.8 and WordPress 4.9

Galleries, oEmbeds and HTML in Widgets

WordPress 4.9 comes with a brand new Gallery widget, which follows the Media and Image widgets introduced in WordPress 4.8. Now galleries can be added to widgets exactly the same way as we do in the post editor.

Gallery widget

The new Gallery widget

Other changes affect Text, Video and Custom HTML widgets. WordPress now parses shortcodes only within posts and pages, and to make them work in a widget we should add these two lines of code to a plugin:

add_filter( 'widget_text', 'shortcode_unautop' );
add_filter( 'widget_text', 'do_shortcode' );

Starting from WordPress 4.9, shortcodes will be parsed in Text widgets by default.

Text widget

In WordPress 4.9 shortcodes are parsed also in Text widgets

Currently, only videos hosted by YouTube and Vimeo could be added to a Video Widget, as these are the only hosted video providers supported by the MediaElement.js library without needing to fall back on oEmbeds. WordPress 4.9 adds oEmbed support in Video widgets, and this change will make it possible to include videos hosted by providers other than YouTube and Vimeo.

Video widget

The improved Video widget allows to embed videos from providers other than YouTube and Vimeo

Furthermore, WordPress 4.9 adds oEmbed support outside post content. This means that available oEmbeds will be allowed in Text widgets as well.

Text widget

In WordPress 4.9 oEmbeds are allowed in Text widgets

Other changes are the support for adding media in Text widgets and the introduction of the CodeMirror text editor in Custom HTML widgets.

CodeMirror

CodeMirror is the new text editor for Custom HTML widgets

Menu, Widget Locations, and Other Changes

When we change the active theme, menus and widgets of the previous theme go lost. This happens even when we switch from a parent theme to its child, and is quite annoying because it forces us to build all the menus and add all the widgets, again and again, every time we change a theme.

WordPress 4.9 fixes this issue so that menu locations and widget areas having similar IDs or names in both themes will be automatically mapped. Moreover, if themes have more than one menu, the menu in the first menu location of the first theme will be automatically mapped to the menu in the first menu location of the second theme. This means that WordPress will preserve menus and widgets in theme switch.

There are also other small improvements to the UI, such as icons now showing up next to each plugin when you go to run updates (as seen below).

WordPress 4.9 update icons

WordPress 4.9 update icons

Changes for Developers

An important change for developers is the inclusion of CodeMirror to theme/plugin editor, Custom CSS editor in Customizer, and Custom HTML widgets.

CodeMirror

CodeMirror in theme/plugin editor

CodeMirror brings the WordPress coding experience to a higher level. It comes with the autocomplete functionality and live syntax error notifications. Furthermore, users are prevented from saving the code in case of error, and this adds a layer of security to code editing (see Include default code editor ticket for further information).

CodeMirror

An error notification in CodeMirror

WordPress 4.9 also adds the new WP_Customize_Code_Editor_Control class, which will allow developers to add custom instances of the CodeMirror text editor in plugins. Here is an example of how to add a custom code editor in the Customizer:

add_action( 'customize_register', 'sample_customize_register' );

function sample_customize_register( WP_Customize_Manager $wp_customize ) {
	$wp_customize->add_setting( 'custom_html' );
	$control = new WP_Customize_Code_Editor_Control( $wp_customize, 'custom_html', array(
		'label' => 'Custom HTML',
		'code_type' => 'text/html',
		'settings' => 'custom_html',
		'section' => 'title_tagline', // Site Identity section
	) );
	$wp_customize->add_control( $control );
}

Other changes in the Customizer are global notifications, panel and section notifications, a notification overlay over the entire screen, and a new date/time control.

Customizer

Panel and section notifications in Customizer

Here is a short list of other interesting changes for developers:

For the full list of WordPress 4.9 changes, see WordPress Release. Here is a great video rundown of all the changes from Dave over at WP Smackdown.

How to Update to WordPress 4.9

Since every customer’s site is different we always recommend utilizing the one-click staging environment. You can clone your live site in a matter of seconds and then test WordPress 4.9 with your existing theme and plugins to check for compatibility. You can of course also take a manual backup before updating your live site, just to be safe.

To update WordPress to 4.9 simply click on the updates icon in your WordPress admin dashboard. And click on the “Update Now” button. While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.

Update to WordPress 4.9

Update to WordPress 4.9

As long as everything goes well with the update you should then see the “What’s New” screen. And that’s it! Quick and easy.

WordPress 4.9 update

WordPress 4.9 update

Troubleshoot Issues With WordPress Update

Whenever people update a major version of WordPress, there are always some that experience issues, and that is due to the thousands of different plugins and themes currently co-existing in the market. Here are a few ways to troubleshoot common issues.

  • Getting the white screen of death? This is commonly resolved by simply restarting PHP/HHVM and deleting the full page cache on your WordPress site.
  • Try deactivating all your plugins to see if that fixes your issue. Then reactivate them one by one until you find which plugin might need an update from the developer.
  • Try switching over to a default WordPress theme, such as Twenty Seventeen. If this fixes your problem, you might want to reach out to your theme developer.
  • Troubleshoot and diagnose JavaScript issues in your browser. This can be especially helpful if a crucial component like the Visual Editor (TinyMCE) breaks.

Conclusions

WordPress 4.9 is now here! It bring us a good number of features that should especially affect the user experience. In my opinion, the most interesting changes are the Customizer improvements, CodeMirror inclusion into the core, and oEmbed support in Video and Text widgets. What features do you prefer in WordPress 4.9?

This article was written by Carlo Daniele

Carlo is a freelance front-end designer and developer. When he writes articles and tutorials, Carlo mainly deals with web standards, but when he plays with websites his best workmate is WordPress.

Hand-picked related articles

  1. Gravatar for this comment's author
    Visualmodo WordPress Themes October 12, 2017 at 6:45 am

    Great post! Hands up for this upgrade on WP!

    1. Gravatar for this comment's author
      Brian Jackson October 16, 2017 at 12:49 am

      Thanks, yes we are looking forward to this update :)

  2. Gravatar for this comment's author
    Apollo13 Themes October 17, 2017 at 5:58 am

    Sounds like great features, however we always have to stay on alert when new changes roll into customizer. As a theme developers that use it in themes.
    However as you said Carlo – looking like great improvements in UI for WordPress users.

    1. Gravatar for this comment's author
      Carlo Daniele October 17, 2017 at 12:23 pm

      I absolutely agree. New features in the Customizer require time and attention from theme developers.
      Anyway, I’m excited about the main additions coming with WP 4.9. I think oEmbeds and CodeMirror will greatly improve the user experience. As a freelancer, I mostly appreciate drafting and scheduling for the reason that now we can share a preview of page customizations with clients before publication without giving them access to the admin panel.

  3. Gravatar for this comment's author
    Dave Warfel November 7, 2017 at 11:01 pm

    Solid article, as usual guys. Nicely done.

    I also just wanted to share a quick, 2.5-minute video I put together highlighting the new features in WordPress 4.9. It comes at things from less of a developer approach and a little more user-centric. Feel free to embed it if you think your audience might enjoy it.

    https://www.youtube.com/watch?v=GSu1xOOJzKk

    1. Gravatar for this comment's author
      Brian Jackson November 8, 2017 at 9:14 am

      Thanks Dave! We’ve added your video to the post. Great rundown of all the changes :)

      1. Gravatar for this comment's author
        Dave November 16, 2017 at 9:14 pm

        Thanks!

  4. Gravatar for this comment's author
    Brian K. Johnson November 12, 2017 at 2:18 am

    The most useful parts: the menu interface improvements, and fixing the theme-switching-menu and-settings-amnesia.

    But as for scheduled theme changes, I have a hard time understanding why anyone would want to do that.

    While code editor improvements are nifty for a developer, we generally shut off theme and plugin editing capabilities because letting a typical user mess with php is problematic, as well as a security risk.

    NOT looking forward to this upgrade, and seriously worried about Gutenberg.

  5. Gravatar for this comment's author
    Sumit November 16, 2017 at 12:46 pm

    I am getting some error after I installed the 4.9 theme.Can anyone help me to fix this bug?

    1. Gravatar for this comment's author
      Brian Jackson November 16, 2017 at 1:17 pm

      Hi Sumit, this is why we always recommend taking a backup and using a staging environment. If you are a Kinsta client, you can one-click restore your site: https://kinsta.com/knowledgebase/restore-wordpress-site/

      We have updated the post above with some common troubleshooting tips. Hope that helps!

Leave a Reply

Use WordPress?

Join 20,000+ others who get our FREE weekly newsletter with WordPress tips on how to drive more traffic and revenue to your business!

You have Successfully Subscribed!

Send this to a friend