Drush

The drush "entity:save" command in Drupal

Submitted by charles on

In Drupal, there's a drush entity:save (alias esav) command which is useful when you want to save entities in bulk.

I needed to use this command the other day to save some entities that update a field value on the entity during a presave hook. Instead of running a database update to change the data, I just triggered the update by saving the entities, e.g

drush esav your_entity_type_id 12167,12168,12169,12170,12171,12172

To save all entities of a type, you can use: