Migrate content from drupal8 to drupal8 programmatically with Node::load and Node::create Basicly I want to migrate content from one drupal8 instance to another. they are mostly identical with some small changes. 

first step is to migrate the content type via drush gen module module and drupal-console drupal config:export:content:type

then i export the content type via script: 

&lt;?PHP
define('DRUPAL_DIR', __DIR__ . "/web");

use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;

require_once DRUPAL_DIR . '/core/includes/database.inc';
require_once DRUPAL_DIR . '/core/includes/schema.inc';
$autoloader = require_once DRUPAL_DIR . '/autoload.php';

$request = Request::createFromGlobals();

$kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod');
$kernel-&gt;boot();
$kernel-&gt;prepareLegacyRequest($request);

use Drupal\node\Entity\Node;
use Drupal\Component\Serialization;
$serializer = \Drupal::service('serializer');

echo "Node Export Starting... \n\n";

// Nodes
$node_ids = \Drupal::entityQuery('node')-&gt;condition('type', 'content-type')-&gt;execute();
echo count($node_ids);
$single_nodes =  \Drupal\node\Entity\Node::loadMultiple($node_ids);
$data = $serializer-&gt;serialize($single_nodes, 'json');
file_put_contents('nodes.json', $data);


i serialize it and write it into a file. 

on the new page I install the exported module to receive all fields for the content type + dependencies and so on. 

if I try now to run my importer script i get serveral errors that the (exported) nodes can not be created. 

 $json = json_decode(file_get_contents(__DIR__ . "/import/nodes.json"));
foreach ($json as $nid =&gt; $nodeImport) {
    $node = Node::create($nodeImport);
    $node-&gt;save();
}


Node::create() doesnt seems to accept whole exported/loaded NodeArrays nor casted arrays like (array)$nodeImport

Am I missing something?
You might consider using Migrate module for this task. For pulling entities from external database use Drupal 8 migration module.