5

Is there a way to change the status of a number of entries at one time?

I know you can select a number of checkboxes and then edit all, but thats still time consuming if you have pages of entries. (In my case, many thousands)

8

This query should work:

UPDATE exp_channel_titles t 
SET t.status = 'pending' 
WHERE t.status = 'open'
AND t.channel_id = 'x'

Change 'x' to your channel id.

| improve this answer | |
  • 1
    It also works without the t. – Jason Varga Dec 12 '12 at 5:28
  • 2
    In my SQL editor, the code coloring on 'status' was showing it as a reserved word, so I wanted to be more specific. – Ryan Masuga Dec 12 '12 at 5:30
3

If you have a specific list of entry_ids you want to change, you can run a query like this with your entry_ids separated by commas:

  UPDATE exp_channel_titles t 
    SET t.status = 'pending' 
    WHERE t.status = 'open'
    AND t.entry_id in (1,2,3,4)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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