1

How do I perform mass updates for entities? Suppose I want to publish 50 nodes at once. How should I do that?

1
  • But what rows? Values in multi-value field? Many entity instances? Please be more specific about your setup.
    – Mołot
    Oct 29, 2013 at 7:27

3 Answers 3

3

You can use Views bulk operations module which support the mass update on the Drupal site.

This module augments Views by allowing bulk operations to be executed on the displayed rows. It does so by showing a checkbox in front of each node, and adding a select box containing operations that can be applied. Drupal Core or Rules actions can be used.

As you said that you want to update the number of nodes, so there is already module in Drupal Administration Views which replace administrative pages with views.

Features

  • Filter all administrative views via AJAX.
  • Perform any kind of bulk/mass operations on items in administrative views.
  • Filter content by title, node type, author, published status, and/or vocabulary.
  • Filter comments by title, author, node title, or published status.
  • Filter users by name, ban/blocked status, or user roles.

Or, if you want to update using code, you can follow harshal's answer.

6

You can perform most of the mass updates in Admin > Content page.

If you require any advanced actions, sorting, filtering, I'd suggest you use Views and Views Bulk Operations modules.

1

If you have a big number of nodes that need to be updated (say, 10,000 or more), the best option available for you is to use DRUSH (Drupal Shell).

With drush you can perform bulky tasks very fast.

1
  • The pro of drush is that it doesn't depend from a browser, and that the PHP timeout is changed to allow longer operations. Other alternatives would require to use a Drupal queue, and a module that run its cron tasks.
    – apaderno
    Oct 29, 2013 at 7:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.