# Magento2 Set Anchor to YES in all Categories

URL: https://sohaib.com/blog/magento2-set-anchor-yes-categories
Author: Sohaib Khan
Published: Jan 11, 2017
Updated: Sep 8, 2026
Category: E-commerce Solutions

> I am assuming you've PHPMYADMIN , not going in detail as to how you install that and all that crap First identify the attribute id of the isanchor attribute: SELECT FROM eavattribute where attributecode =…

I am assuming you've PHPMYADMIN , not going in detail as to how you install that and all that crap First identify the attribute id of the is\_anchor attribute:

```sql
SELECT * FROM eav_attribute where attribute_code = 'is_anchor';
```

I get attribute 54 as my query not sure what you will get as that's all depends on your environment Now let's run a Query to update all category to Anchor YES

```sql
UPDATE catalog_category_entity_int set value = 1 where attribute_id = 54;
```

TADA !!!!!!
