diff --git a/includes/block-migrate/loader.php b/includes/block-migrate/loader.php index ad5d4d6b1b6..d783bce4e97 100644 --- a/includes/block-migrate/loader.php +++ b/includes/block-migrate/loader.php @@ -35,6 +35,11 @@ function( WP_Post &$post ) { return; } + // Bail if DOMDocument is not available. + if ( ! class_exists( 'DOMDocument' ) ) { + return; + } + // Parse the blocks so we can search them in a standard way. $parsed_blocks = parse_blocks( $post->post_content );