diff --git a/src/Commands/DefaultContentDeployCommands.php b/src/Commands/DefaultContentDeployCommands.php
index acaaa4b..deb819d 100644
--- a/src/Commands/DefaultContentDeployCommands.php
+++ b/src/Commands/DefaultContentDeployCommands.php
@@ -176,7 +176,11 @@ class DefaultContentDeployCommands extends DrushCommands {
 
       // Set text_dependencies option.
       $text_dependencies = $options['text_dependencies'];
-      $text_dependencies = filter_var($text_dependencies, FILTER_VALIDATE_BOOLEAN);
+
+      if (!is_null($text_dependencies)) {
+        $text_dependencies = filter_var($text_dependencies, FILTER_VALIDATE_BOOLEAN);
+      }
+
       $this->exporter->setTextDependencies($text_dependencies);
 
       $this->exporter->setMode('reference');
@@ -297,12 +301,8 @@ class DefaultContentDeployCommands extends DrushCommands {
       $this->importer->setFolder($options['folder']);
     }
 
-    $this->importer->prepareForImport();
-    $this->displayImportResult();
-
-    if (!$this->isAllSkip() && $this->io()->confirm(dt('Do you really want to continue?'))) {
+    if ($this->io()->confirm(dt('Do you really want to continue?'))) {
       $this->importer->import();
-      $this->io()->success(dt('Content has been imported.'));
     }
   }
 
@@ -357,37 +357,6 @@ class DefaultContentDeployCommands extends DrushCommands {
     }
   }
 
-  /**
-   * Display info before/after import.
-   */
-  private function displayImportResult() {
-    $result = $this->importer->getResult();
-    $array_column = array_column($result, 'status');
-    $count = array_count_values($array_column);
-
-    if ($this->output()->isVerbose()) {
-      $table = new Table($this->output());
-      $table->setHeaders(['Action', 'Entity Type', 'UUID']);
-      foreach ($result as $uuid => $data) {
-        $table->addRow([$data['status'], $data['entity_type_id'], $uuid]);
-      }
-      $table->render();
-      $this->output()->writeln(dt('Summary:'));
-    }
-
-    $this->output()->writeln(dt('- created: @count', [
-      '@count' => isset($count['create']) ? $count['create'] : 0,
-    ]));
-
-    $this->output()->writeln(dt('- updated: @count', [
-      '@count' => isset($count['update']) ? $count['update'] : 0,
-    ]));
-
-    $this->output()->writeln(dt('- skipped: @count', [
-      '@count' => isset($count['skip']) ? $count['skip'] : 0,
-    ]));
-  }
-
   /**
    * Is update or create not exist.
    *
diff --git a/src/Exporter.php b/src/Exporter.php
index 20d6557..b75739a 100644
--- a/src/Exporter.php
+++ b/src/Exporter.php
@@ -6,6 +6,7 @@ use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Database\Connection;
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Entity\EntityChangedInterface;
 use Drupal\Core\Entity\EntityRepositoryInterface;
@@ -26,6 +27,8 @@ use Drupal\layout_builder\SectionComponent;
  */
 class Exporter {
 
+  use DependencySerializationTrait;
+
   /**
    * The config factory.
    *
@@ -419,32 +422,31 @@ class Exporter {
   public function export() {
     switch ($this->mode) {
       case 'default':
-        $this->prepareToExport();
+        $this->exportBatch();
         break;
 
       case 'reference':
-        $this->prepareToExportWithReference();
+        $this->exportBatch(TRUE);
         break;
 
       case 'all':
-        $this->prepareToExportAllContent();
+        $this->exportAllBatch();
         break;
     }
 
-    // Edit and export all entities to folder.
-    $this->editEntityData();
-    $this->writeConfigsToFolder();
-
     return $this;
   }
 
   /**
-   * Prepare content to export.
+   * Export content in batch.
+   *
+   * @param boolean $with_references
+   *   Indicates if export should consider referenced entities.
    *
    * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
    * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
    */
-  private function prepareToExport() {
+  private function exportBatch($with_references = FALSE) {
     $entity_type = $this->entityTypeId;
     $exported_entity_ids = $this->getEntityIdsForExport();
 
@@ -452,33 +454,113 @@ class Exporter {
       $this->fileSystem->deleteRecursive($this->getFolder());
     }
 
+    $export_type = $with_references ? "exportBatchWithReferences" : "exportBatchDefault";
+
     foreach ($exported_entity_ids as $entity_id) {
-      /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
-      $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
-      $exported_entity = $this->getSerializedContent($entity);
-      $this->addExportedEntity($exported_entity);
+      $operations[] = [
+        [$this, $export_type],
+        [$entity_type, $entity_id],
+      ];
     }
+
+    // Set up batch information.
+    $batch = [
+      'title' => t('Exporting content'),
+      'operations' => $operations,
+      'finished' => [$this, 'exportFinished'],
+    ];
+
+    batch_set($batch);
+
+    if (PHP_SAPI === 'cli') {
+      drush_backend_batch_process();
+     }
   }
 
   /**
-   * Prepare content with reference to export.
+   * Prepares and exports a single entity to a JSON file.
    *
-   * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
-   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
-   */
-  private function prepareToExportWithReference() {
-    $entity_type = $this->entityTypeId;
-    $exported_entity_ids = $this->getEntityIdsForExport();
-
-    if ($this->forceUpdate) {
-      $this->fileSystem->deleteRecursive($this->getFolder());
+   * @param string $entity_type
+   *   The type of the entity being exported.
+   * @param int $entity_id
+   *   The ID of the entity being exported.
+   * @param array $context
+   *   The batch context.
+   */
+  public function exportBatchDefault($entity_type, $entity_id, &$context) {
+    // Prepare export of entity.
+    $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
+    $exported_entity = $this->getSerializedContent($entity);
+
+    // Remove or add a new fields to serialize entities data.
+    $entity_array = $this->serializer->decode($exported_entity, 'hal_json');
+    $entity_type_object = $this->entityTypeManager->getDefinition($entity_type);
+    $id_key = $entity_type_object->getKey('id');
+    $entity_id = $entity_array[$id_key][0]['value'];
+    $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
+
+    unset($entity_array[$entity_type_object->getKey('revision')]);
+
+    if ($entity_type === 'user') {
+      $entity_array['pass'][0]['value'] = $entity->getPassword();
     }
 
-    foreach ($exported_entity_ids as $entity_id) {
-      /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
-      $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
+    $data = $this->serializer->serialize($entity_array, 'hal_json', [
+      'json_encode_options' => JSON_PRETTY_PRINT
+    ]);
+
+    // Write serialized entity to JSON file.
+    $uuid = $entity->get('uuid')->value;
+    $entity_type_folder = "{$this->getFolder()}/{$entity_type}";
+    $this->fileSystem->prepareDirectory($entity_type_folder, FileSystemInterface::CREATE_DIRECTORY);
+
+    file_put_contents("{$entity_type_folder}/{$uuid}.json", $data);
+  }
+
+  /**
+   * Prepares and exports a single entity to a JSON file with references.
+   *
+   * @param string $entity_type
+   *   The type of the entity being exported.
+   * @param int $entity_id
+   *   The ID of the entity being exported.
+   * @param array $context
+   *   The batch context.
+   */
+  public function exportBatchWithReferences($entity_type, $entity_id, &$context) {
+    // Get referenced entities.
+    $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
+
+    $exported_entities = [];
+    if ($entity instanceof ContentEntityInterface) {
       $exported_entities = $this->getSerializedContentWithReferences($entity);
-      $this->addExportedEntity($exported_entities);
+    }
+    
+    foreach ($exported_entities as $entity_type => $exported_entity_array) {
+      foreach ($exported_entity_array as $uuid => $exported_entity) {
+        // Remove or add a new fields to serialize entities data.
+        $entity_array = $this->serializer->decode($exported_entity, 'hal_json');
+        $entity_type_object = $this->entityTypeManager->getDefinition($entity_type);
+        $id_key = $entity_type_object->getKey('id');
+        $entity_id = $entity_array[$id_key][0]['value'];
+        $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
+
+        unset($entity_array[$entity_type_object->getKey('revision')]);
+
+        if ($entity_type === 'user') {
+          $entity_array['pass'][0]['value'] = $entity->getPassword();
+        }
+
+        $data = $this->serializer->serialize($entity_array, 'hal_json', [
+          'json_encode_options' => JSON_PRETTY_PRINT
+        ]);
+
+        // Write serialized entity to JSON file.
+        $entity_type_folder = "{$this->getFolder()}/{$entity_type}";
+        $this->fileSystem->prepareDirectory($entity_type_folder, FileSystemInterface::CREATE_DIRECTORY);
+
+        file_put_contents("{$entity_type_folder}/{$uuid}.json", $data);
+      }
     }
   }
 
@@ -488,7 +570,7 @@ class Exporter {
    * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
    * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
    */
-  private function prepareToExportAllContent() {
+  private function exportAllBatch() {
     $content_entity_types = $this->deployManager->getContentEntityTypes();
 
     if ($this->forceUpdate) {
@@ -506,18 +588,43 @@ class Exporter {
         $entity_ids = array_values($query->execute());
 
         foreach ($entity_ids as $entity_id) {
-          /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
-          $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id);
-
-          if ($time && $entity instanceof EntityChangedInterface && $entity->getChangedTimeAcrossTranslations() < $time) {
-            continue;
-          }
-
-          $exported_entity = $this->getSerializedContent($entity);
-          $this->addExportedEntity($exported_entity);
+          $operations[] = [
+            [$this, 'exportBatchDefault'],
+            [$entity_type, $entity_id],
+          ];
         }
       }
     }
+
+    // Set up batch information.
+    $batch = [
+      'title' => t('Exporting content'),
+      'operations' => $operations,
+      'finished' => [$this, 'exportFinished'],
+    ];
+
+    batch_set($batch);
+
+    if (PHP_SAPI === 'cli') {
+      drush_backend_batch_process();
+    }
+  }
+
+  /**
+   * Callback function to handle batch processing completion.
+   *
+   * @param bool $success
+   *   Indicates whether the batch processing was successful.
+   */
+  public function exportFinished($success, $results, $operations) {
+    if ($success) {
+      // Batch processing completed successfully.
+      \Drupal::messenger()->addMessage(t('Batch export completed successfully.'));
+    }
+    else {
+      // Batch processing encountered an error.
+      \Drupal::messenger()->addMessage(t('An error occurred during the batch export process.'), 'error');
+    }
   }
 
   /**
diff --git a/src/Form/ImportForm.php b/src/Form/ImportForm.php
index 6625f47..ab3c5a1 100644
--- a/src/Form/ImportForm.php
+++ b/src/Form/ImportForm.php
@@ -163,8 +163,6 @@ class ImportForm extends FormBase {
       }
 
       $this->importer->setForceOverride($force_override);
-      $this->importer->prepareForImport();
-      $this->addResultMessage();
       $this->importer->import();
     }
     catch (\Exception $exception) {
@@ -172,27 +170,4 @@ class ImportForm extends FormBase {
     }
   }
 
-  /**
-   * Add a message with importing results.
-   */
-  private function addResultMessage() {
-    $result = $this->importer->getResult();
-    $array_column = array_column($result, 'status');
-    $count = array_count_values($array_column);
-
-    $this->messenger->addMessage($this->t('Created: @count', [
-      '@count' => isset($count['create']) ? $count['create'] : 0,
-    ]));
-
-    $this->messenger->addMessage($this->t('Updated: @count', [
-      '@count' => isset($count['update']) ? $count['update'] : 0,
-    ]));
-
-    $this->messenger->addMessage($this->t('Skipped: @count', [
-      '@count' => isset($count['skip']) ? $count['skip'] : 0,
-    ]));
-
-    return $this;
-  }
-
 }
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index fa6a93e..b00ba2f 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -9,6 +9,10 @@ namespace Drupal\default_content_deploy\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\Entity\ContentEntityTypeInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Settings form.
@@ -20,6 +24,31 @@ class SettingsForm extends ConfigFormBase {
    */
   const DIRECTORY = 'default_content_deploy.content_directory';
 
+  /**
+   * The Entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) {
+    parent::__construct($config_factory);
+    $this->entityTypeManager = $entity_type_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('config.factory'),
+      $container->get('entity_type.manager'),
+    );
+  }
+
   /**
    * {@inheritdoc}
    */
@@ -56,6 +85,35 @@ class SettingsForm extends ConfigFormBase {
       '#description' => 'If selected, embedded entities within processed text fields will be included in the export.',
     ];
 
+    $all_entity_types = $this->entityTypeManager->getDefinitions();
+    $content_entity_types = [];
+
+    // Filter the entity types.
+    /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_type_options */
+    foreach ($all_entity_types as $entity_type) {
+      if (($entity_type instanceof ContentEntityTypeInterface)) {
+        $content_entity_types[$entity_type->id()] = $entity_type->getLabel();
+      }
+    }
+
+    // Entity types.
+    $form['enabled_entity_types'] = [
+      '#type' => 'details',
+      '#open' => FALSE,
+      '#title' => $this->t('Enabled entity types'),
+      '#description' => $this->t('Check which entity types should be exported by reference.'),
+      '#tree' => TRUE,
+    ];
+
+    $form['enabled_entity_types']['entity_types'] = [
+      '#type' => 'checkboxes',
+      '#title' => $this->t('Enabled entity types'),
+      '#options' => $content_entity_types,
+      // If no custom settings exist, content entities are enabled by default.
+      '#default_value' => $config->get('enabled_entity_types') ?: array_keys($content_entity_types),
+      '#required' => TRUE,
+    ];
+
     return parent::buildForm($form, $form_state);
   }
 
@@ -65,6 +123,7 @@ class SettingsForm extends ConfigFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $this->configFactory->getEditable(static::DIRECTORY)
       ->set('content_directory', $form_state->getValue('content_directory'))
+      ->set('enabled_entity_types', array_values(array_filter($form_state->getValue('enabled_entity_types')['entity_types'])))
       ->set('text_dependencies', $form_state->getValue('text_dependencies'))
       ->save();
 
diff --git a/src/Importer.php b/src/Importer.php
index 3ef0a69..90958d0 100644
--- a/src/Importer.php
+++ b/src/Importer.php
@@ -5,6 +5,7 @@ namespace Drupal\default_content_deploy;
 use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Database\Connection;
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Entity\EntityChangedInterface;
 use Drupal\Core\Entity\EntityRepositoryInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
@@ -23,6 +24,8 @@ use Symfony\Component\Serializer\Serializer;
  */
 class Importer {
 
+  use DependencySerializationTrait;
+
   /**
    * Deploy manager.
    *
@@ -141,6 +144,13 @@ class Importer {
    */
   protected $newUuids = [];
 
+  /**
+   * The batch context.
+   *
+   * @var array
+   */
+  protected $context;
+
   /**
    * Constructs the default content deploy manager.
    *
@@ -237,20 +247,88 @@ class Importer {
    * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
    * @throws \Exception
    */
-  public function prepareForImport() {
+  public function import() {
     // @todo remove because of changes in core >= 9.2
     $this->cache->delete('hal:links:relations');
     $this->files = $this->scan($this->getFolder());
 
+    // Process files in batches.
+    $operations = [];
+    $total = count($this->files);
+    $current = 1;
+
+    // Initialize progress tracking here.
+    if (!isset($this->context['sandbox']['progress'])) {
+      $this->context['sandbox']['progress'] = 0;
+      $this->context['sandbox']['total'] = $total;
+    }
+
+    if ($total == 0) {
+      \Drupal::messenger()->addMessage(t('Nothing to import.'));
+      return;
+    }
+
     foreach ($this->files as $file) {
-      $uuid = str_replace('.json', '', $file->name);
+      $prepare_operations[] = [
+        [$this, 'decodeFile'],
+        [$file, $current, $total],
+      ];
 
-      if (!isset($this->dataToImport[$uuid])) {
-        $this->decodeFile($file);
-      }
+      $import_operations[] = [
+        [$this, 'importEntity'],
+        [$total, $current],
+      ];
+
+      $current++;
     }
 
-    return $this;
+    $operations = array_merge($prepare_operations, $import_operations);
+
+    $batch = [
+      'title' => t('Importing Default Content'),
+      'operations' => $operations,
+      'finished' => [$this, 'importFinished'],
+    ];
+
+    batch_set($batch);
+
+    if (PHP_SAPI === 'cli') {
+      drush_backend_batch_process();
+    }
+  }
+
+  /**
+   * Callback function to handle batch pre-processing completion.
+   *
+   * @param bool $success
+   *   Indicates whether the batch processing was successful.
+   */
+  public function importFinished($success, $results, $operations) {
+    if ($success) {
+      // Batch processing completed successfully.
+      \Drupal::messenger()->addMessage(t('Batch import completed successfully.'));
+
+      // Output result counts.
+      $results = !empty($results['data_to_import']) ? $results['data_to_import'] : [];
+      $array_column = array_column($results, 'status');
+      $count = array_count_values($array_column);
+
+      \Drupal::messenger()->addMessage(t('Created: @count', [
+        '@count' => isset($count['create']) ? $count['create'] : 0,
+      ]));
+
+      \Drupal::messenger()->addMessage(t('Updated: @count', [
+        '@count' => isset($count['update']) ? $count['update'] : 0,
+      ]));
+
+      \Drupal::messenger()->addMessage(t('Skipped: @count', [
+        '@count' => isset($count['skip']) ? $count['skip'] : 0,
+      ]));
+    }
+    else {
+      // Batch processing encountered an error.
+      \Drupal::messenger()->addMessage(t('An error occurred during the batch import process.'), 'error');
+    }
   }
 
   /**
@@ -291,93 +369,98 @@ class Importer {
   }
 
   /**
-   * Import to entity.
+   * Imports a single entity as part of the batch process.
    *
-   * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
-   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
-   * @throws \Drupal\Core\Entity\EntityStorageException
+   * @param string $uuid
+   *   The UUID of the entity to import.
+   * @param array $data
+   *   The data of the entity to import.
    */
-  public function import() {
-    $files = $this->dataToImport;
+  public function importEntity($total, $current, &$context) {
+    $batch = batch_get();
+    $data_to_import = $batch['sets'][0]['results']['data_to_import'];
+
+    $keys = array_keys($data_to_import);
+    // We are accessing an array, so subtract 1 to start at zero.
+    $uuid = $keys[$current - 1];
+    $data = $data_to_import[$uuid];
 
     if (PHP_SAPI === 'cli') {
       $root_user = $this->entityTypeManager->getStorage('user')->load(1);
       $this->accountSwitcher->switchTo($root_user);
     }
 
-    // All entities with entity references will be imported two times to ensure
-    // that all entity references are present and valid. Path aliases will be
-    // imported last to have a chance to rewrite them to the new ids of newly
-    // created entities.
-    for ($i = 0; $i <= 2; $i++) {
-      foreach ($files as $uuid => &$file) {
-        $entity_type = $file['entity_type_id'];
-        if ($file['status'] !== 'skip') {
-          if (
-            ($i !== 2 && $entity_type === 'path_alias') ||
-            ($i === 2 && $entity_type !== 'path_alias')
-          ) {
-            continue;
-          }
-          $this->linkManager->setLinkDomain($this->getLinkDomain($file));
-          $class = $this->entityTypeManager->getDefinition($entity_type)->getClass();
-          $needs_second_run = $this->preDenormalize($file, $entity_type);
-
-          /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
-          $entity = $this->serializer->denormalize($file['data'], $class, 'hal_json', ['request_method' => 'POST']);
-          $this->eventDispatcher->dispatch(new PreSaveEntityEvent($entity, $file['data']));
-          $entity->enforceIsNew($file['is_new']);
-          $entity->save();
-          $this->entityIdLookup[$uuid] = $entity->id();
-
-          if ($file['is_new']) {
-            $this->newUuids[] = $uuid;
-          }
+    $entity_type_id = $data['entity_type_id'];
+    $entity_type_object = $this->entityTypeManager->getDefinition($entity_type_id);
 
-          if ($entity_type === 'user') {
-            // Workaround: store the hashed password directly in the database
-            // and avoid the entity API which doesn't provide support for
-            // setting password hashes directly.
-            $hashed_pass = $file['data']['pass'][0]['value'] ?? FALSE;
-            if ($hashed_pass) {
-              $this->database->update('users_field_data')
-                ->fields([
-                  'pass' => $hashed_pass,
-                ])
-                ->condition('uid', $entity->id(), '=')
-                ->execute();
-            }
-          }
+    // Keys of entity.
+    $key_id = $entity_type_object->getKey('id');
+    $key_revision_id = $entity_type_object->getKey('revision');
 
-          if ((!$needs_second_run && empty($file['references'])) || $i === 1) {
-            // Don't handle entities without references twice. Don't handle
-            // entities with references again in the third run for path aliases.
-            unset($files[$uuid]);
-          }
-          else {
-            // In the second run new entities should be updated.
-            $file['status'] = 'update';
-            $file['is_new'] = FALSE;
-            $file['data'][$file['key_id']][0]['value'] = $entity->id();
-          }
-        }
-        elseif ($i === 0) {
-          // Get the entity ID of a skipped referenced item in the first run to
-          // enable a target ID correction in referencing entities in the second
-          // and third run.
-          $entity = $this->entityRepository->loadEntityByUuid($entity_type, $uuid);
-          $this->entityIdLookup[$uuid] = $entity->id();
-        }
+    // Check if the entity already exists.
+    $entity = $this->entityRepository->loadEntityByUuid($entity_type_id, $uuid);
+
+    if ($entity) {
+      // Entity already exists, update it.
+      $this->linkManager->setLinkDomain($this->getLinkDomain($data));
+      $current_entity_decoded = $this->serializer->decode($this->exporter->getSerializedContent($entity), 'hal_json');
+      $diff = ArrayDiffMultidimensional::looseComparison($data['data'], $current_entity_decoded);
+
+      // Update the entity if it's different from the existing one.
+      if ($diff) {
+        $this->preAddToImport($data);
+        $this->addToImport($data);
+        $data['status'] = 'update';
+        $data['is_new'] = FALSE;
       }
-      unset($file);
+      else {
+        $data['status'] = 'skip';
+      }
+
+      // @todo is this still needed?
+      $this->linkManager->setLinkDomain(FALSE);
     }
+    else {
+      // Entity doesn't exist, create it.
+      $this->linkManager->setLinkDomain($this->getLinkDomain($data));
+      $class = $entity_type_object->getClass();
+      $entity = $this->serializer->denormalize($data['data'], $class, 'hal_json', ['request_method' => 'POST']);
+      $entity->enforceIsNew($data['is_new']);
+      $entity->save();
+      $this->entityIdLookup[$uuid] = $entity->id();
+
+      // If the entity type is 'user', update the password directly in the database.
+      if ($entity_type_id === 'user') {
+        $hashed_pass = $data['data']['pass'][0]['value'] ?? FALSE;
+        if ($hashed_pass) {
+          $this->database->update('users_field_data')
+            ->fields([
+              'pass' => $hashed_pass,
+            ])
+            ->condition('uid', $entity->id(), '=')
+            ->execute();
+        }
+      }
 
-    // @todo is this still needed?
-    $this->linkManager->setLinkDomain(FALSE);
+      // Record the entity lookup.
+      if (isset($data['data'][$key_id][0]['value'])) {
+        $this->entityLookup[$entity_type_id][$data['data'][$key_id][0]['value']] = $uuid;
+      }
+
+      // Add the entity to import.
+      $this->preAddToImport($data);
+      $this->addToImport($data);
+      $data['status'] = 'create';
+    }
 
     if (PHP_SAPI === 'cli') {
       $this->accountSwitcher->switchBack();
     }
+
+    // Provide update progress.
+    $context['message'] = t('Importing entity @current of @total', ['@current' => $current, '@total' => $total]);
+
+    return $this;
   }
 
   /**
@@ -396,14 +479,15 @@ class Importer {
    * Prepare file to import.
    *
    * @param $file
+   * @param $current
+   * @param $total
+   * @param $context
    *
    * @return $this
    *
-   * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
-   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
    * @throws \Exception
    */
-  protected function decodeFile($file) {
+  public function decodeFile($file, $current, $total, &$context) {
     // Check that this file has not been decoded already.
     if (array_key_exists($file->name, $this->discoveredReferences)) {
       return $this;
@@ -425,7 +509,7 @@ class Importer {
     $this->discoveredReferences[$file->name] = $file;
     if ($references) {
       foreach ($references as $reference) {
-        $this->decodeFile($reference);
+        $this->decodeFile($reference, $current, $total, $context);
       }
     }
 
@@ -440,6 +524,11 @@ class Importer {
     $this->preAddToImport($data_to_import);
     $this->addToImport($data_to_import);
 
+    // Pass export data to results.
+    $uuid = $data_to_import['data']['uuid'][0]['value'];
+    $context['results']['data_to_import'][$uuid] = $data_to_import;
+    $context['message'] = t('Preparing entity @current of @total for import', ['@current' => $current, '@total' => $total]);
+
     return $this;
   }
 
