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)

2 Answers 2

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.

2
  • 1
    It also works without the t. Commented Dec 12, 2012 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. Commented Dec 12, 2012 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)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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