use Drupal\taxonomy\Entity\Term; $data = [ [ 'tid' => 10, 'vid' => 'approval_status', 'langcode' => 'en', 'name' => 'Approved', 'description__value' => null, 'description__format' => null, 'weight' => 0, 'uuid' => '78bea628-2ac8-4db4-840f-87b17564a269', ], [ 'tid' => 9, 'vid' => 'approval_status', 'langcode' => 'en', 'name' => 'Denied', 'description__value' => null, 'description__format' => null, 'weight' => 0, 'uuid' => 'ce392a87-79fc-46a5-934b-3cce42902c5c', ], [ 'tid' => 11, 'vid' => 'approval_status', 'langcode' => 'en', 'name' => 'Need more information', 'description__value' => null, 'description__format' => null, 'weight' => 0, 'uuid' => 'e0b242ab-e449-4826-a1eb-9346ee3b7bb7', ], ]; foreach ($data as $term_data) { $term = Term::create([ 'tid' => $term_data['tid'], 'vid' => $term_data['vid'], 'langcode' => $term_data['langcode'], 'name' => $term_data['name'], 'description' => [ 'value' => $term_data['description__value'], 'format' => $term_data['description__format'], ], 'weight' => $term_data['weight'], 'uuid' => $term_data['uuid'], ]); $term->save(); }