Move a product attribute to a new group in magento admin

Move a product attribute to a new group in magento admin

September 14, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Move a product attribute to a new group in magento admin

Moving an attribute group within the Magento admin involves a few steps that require direct modification of the database schema. In your current example, you’re trying to update the ‘group’ field using the updateAttribute method, but this method doesn’t support moving an attribute between groups.

To achieve this, we need to directly modify the eav_attribute table in the Magento database. Here’s a step-by-step guide on how to move the “Alice Id” attribute from the “Special Attributes” group to the “Additional Attributes” group:

Step 1: Back up your Magento database

Before making any structural changes, it’s crucial to back up your current database schema. This ensures you can restore your data if anything goes wrong during the migration process.

You can use a tool like phpMyAdmin or MySQL Workbench to create a backup of your eav_attribute table:

CREATE TABLE eav_attribute_backup AS SELECT * FROM eav_attribute;

Step 2: Identify the attribute and group IDs

To move an attribute between groups, you need to identify the unique identifiers for both the attribute and the target group. You can find these values in the eav_attribute table:

  • ID (attribute_id)
  • Group name (default_value)

Here’s a query that retrieves the required information:

SELECT attribute_id, attribute_code, default_value FROM eav_attribute WHERE attribute_code = 'alice_id';

Step 3: Identify the target group ID

Next, you need to find the unique identifier for the “Additional Attributes” group. This can be found in the eav_attribute_group table:

SELECT group_id, group_name FROM eav_attribute_group WHERE group_name = 'Additional Attributes';

Step 4: Update the attribute’s group field

Now that you have both the attribute ID and the target group ID, you can update the group_id value in the eav_attribute table:

UPDATE eav_attribute SET group_id = <TARGET_GROUP_ID> WHERE attribute_code = 'alice_id';

Replace <TARGET_GROUP_ID> with the corresponding value from Step 3.

Step 5: Update the product attributes

After updating the group_id, you need to update the product’s attribute values in the catalog_product_entity_int or catalog_product_entity_varchar table, depending on the data type of your “Alice Id” attribute:

For int-type attributes:

UPDATE catalog_product_entity_int SET value = <NEW_GROUP_ID> WHERE attribute_id IN (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'alice_id') AND entity_type_id = 4;

For varchar-type attributes:

UPDATE catalog_product_entity_varchar SET value = <NEW_GROUP_ID> WHERE attribute_id IN (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'alice_id') AND entity_type_id = 4;

Conclusion

Moving an attribute between groups in Magento requires direct interaction with the database schema. By following this guide, you can successfully relocate your “Alice Id” attribute from one group to another without any data loss.

Remember to always backup your database before making structural changes and test the migration process thoroughly on a development environment before applying it to your production site.

For more detailed information about Magento’s EAV (Entity-Attribute-Value) model, you can refer to the official documentation at https://laravelcompany.com/docs/magento/eav.html.

Happy coding! Let me know if you have any further questions.

Catalog Database API Admin

Our network