Developer Documentation

Upgrading to v9

If you are migrating from WordPress to Altis, check out the migrating guide here first.

To upgrade to Altis v9, edit your composer.json and change the version constraint for altis/altis and any local environment modules to ^9.0.0.

In addition you will need to change the config.platform.php property to 7.4.13 (if present).

{
	"require": {
		"altis/altis": "^9.0.0"
	},
	"require-dev": {
		"altis/local-chassis": "^9.0.0",
		"altis/local-server": "^9.0.0"
	},
	"config": {
		"platform": {
			"php": "7.4.13"
		}
	}
}

Once you have made these changes run composer update and then run the wp altis migrate command:

# For cloud environments
wp altis migrate

# For local server
composer server cli -- altis migrate

# For local chassis
composer chassis exec -- wp altis migrate

Breaking Changes

Asset Manager Framework

The latest version of Asset Manager Framework contains breaking changes that will affect any custom providers you have built or are using on your projects.

The main change is that the request() method in your extended Provider class must now return a MediaResponse object. This is to support the addition of pagination in the media modal in WordPress 5.8.

Check out the documentation for updated example code.

Elasticsearch Version

The new default Elasticsearch version is 7.10. Local Chassis and Local Server now both provide the means to set the Elasticsearch version in your Altis config. Existing applications will remain on their current version (6.2) until an update is requested via support.

Check the documentation for your local environment here:

New cloud instances of Altis will default to Elasticsearch 7.10. To upgrade your cloud environments please read the new Updating Elasticsearch guide carefully and follow the steps provided.

Block Editor

The Block Editor in WordPress 5.8 requires blocks to be registered on the server side and client side. You might find that any server side only blocks, or client only blocks you have registered stop working.

It is recommended to use the block.json pattern detailed here when authoring or updating existing blocks.

The EditorGlobalKeyboardShortcuts component has been renamed to VisualEditorGlobalKeyboardShortcuts.

The hasUploadPermissions selector from the core store should be replaced with select( 'core' ).canUser( 'create', 'media' ).

Block Based Widgets

WordPress will enable block based widget editing by default unless you opt out specifically using the following filter in your application:

add_filter( 'use_widgets_block_editor', '__return_false' );

Existing legacy widgets can still be managed via the new block based editor but you should consider converting them to blocks to be ready for full site editing.

Internet Explorer 11

Support for Internet Explorer 11 in the admin and the admin bar on the front end has been dropped. IE11 is used by less than 1% of all web users and many large sites and applications have already dropped support.

Headline Features

WordPress 5.8

WordPress 5.8 brings with it a whole host of improvements to the block editor API, the REST API, Widgets and much more. In addition it brings initial support for Full Site Editing using the block editor for themes that support it. Look out for full site editing related tools and features in future Altis releases!

The WordPress 5.8 Field Guide is a great place to learn about what's new. Here are some of the highlights:

  • The new theme.json file provides a way for themes to define global settings that blocks can use via the useSetting() hook, and can also be used to define the default settings for individual blocks such as fonts, colors, sizes, any attribute that can be set for a block!
  • Widgets are now managed via a block based editor
  • The Template Editor lets you create reusable page layouts using all the blocks available to your site, along with higher level blocks for site logo, nav menus and other structural elements. The templates can be saved and reused on your pages and posts and work in the same way as page templates defined in the theme.
  • Support for uploading WebP images has been added. Altis already converts JPEG and PNG images to WebP by default for browsers that support them however existing WebP images could not be uploaded directly previously.
  • REST API support for widgets enables the new block based widget editor and provides a robust way to use widgets with headless applications.

ARM64 and Apple M1 Support

New M1 Macbooks and devices with ARM64 CPUs were previously unable to run Local Server. With Altis v9 Local Server is now fully compatible with these devices so you and your team can get the benefits of using the latest technology and up to a 3.5x speed improvement over devices with Intel CPUs.

Note that if you are using one of these devices you must use Elasticsearch 7.10.

Local Chassis is not compatible with devices using ARM64 CPUs as it relies on VirtualBox.

Elasticsearch 7.10

Elasticsearch has come a long way with improved and new query types, aggregations and language support. As part of the upgrade to this version Altis now no longer requires you to reindex your content manually after updating synonyms, stopwords or the Japanese user dictionary. This means developers no longer need to run long and costly processes on behalf of users.

This upgrade also unlocks exciting new capabilities that will be powering future Altis features and enhancements so stay tuned!