1

A client asked me to temporarily disabled all of its entries of one of its Site in a specific language. This entries should not be accessible anymore from their URL.

The quickest and cleanest way to hide them would be to delete this Site version, but this would result in deleting all related entries.

As far as I know, the only way to hide them temporarily is to visit each Entry, then disabled the Enabled for site option, and after that make some changes in menu template to hide this Site version.

As there's a very large number of Entries, this will be very time consuming. Is there any cleaner or faster way to do that?

0
  1. from the entry section of the control panel, select the site on which you want to disable all entries
  2. select the entries you'd like to disable
  3. use the set status dropdown and select "Disabled" enter image description here
| improve this answer | |
  • This disables all versions within a same site group. This is not what I want, as in each site group I have multiple languages versions. – Romain Poirier Sep 15 at 7:41
  • Strange, I just tested again and it only disables entries in the currently selected site, even if my 2 sites are in the same site group. – nstCactus Sep 15 at 9:35
  • 1
    Thanks! This website is running an old Craft Pro 3.0.22 version: maybe there were a related issue in this one. I tried on a brand new Craft Pro 3.5.9, and entries were disabled as explained in your answer. That said, the SQL query would probably be a quickest choice in a case of hundreds of entries to disable. – Romain Poirier Sep 15 at 10:08
1

I finally ended up with this SQL query, which result to disable all Entries of a site version:

UPDATE `craft_elements_sites` SET `enabled` = '0' WHERE `craft_elements_sites`.`siteId` = 2;

Where 2 is the siteId. After that, don't forget to clear the templates caches.

| 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.