How to Manage Product Attributes in Magento
Product attributes are an essential part of the Magento 2 catalog system. They store information about products and allow customers to compare products, filter catalog results, configure products, and find the items they need more easily.
Examples of product attributes include:
- Brand
- Color
- Size
- Material
- Weight
- Manufacturer
- Storage Capacity
- Screen Size
- Operating System
Magento includes many built-in attributes, but you can also create custom attributes according to your store’s requirements.
In this guide, you will learn how to create, edit, configure, assign, and manage product attributes in Magento 2.
What Is a Product Attribute in Magento?
A product attribute is a property that describes a product.
For example, a laptop could have the following attributes:
| Attribute | Value |
|---|---|
| Brand | Lenovo |
| Processor | Intel Core i7 |
| RAM | 16GB |
| Storage | 512GB SSD |
| Screen Size | 15.6 inches |
| Color | Black |
Magento stores these values as structured product information.
Attributes can also be used for:
- Product filtering
- Layered navigation
- Product comparison
- Search
- Configurable products
- Product sorting
- Catalog rules
- Product information displays
Magento Product Attributes vs Attribute Sets
Before managing attributes, it is important to understand the difference between an attribute and an attribute set.
Product Attribute
An attribute describes one particular product property.
For example:
Color
Size
Brand
Material
Attribute Set
An attribute set is a collection of attributes assigned to a product type.
For example, a Laptop attribute set might contain:
Brand
Processor
RAM
Storage
Screen Size
Operating System
Color
This allows you to organize attributes according to the type of products you sell.
Step 1: Log In to Magento Admin
Log in to your Magento 2 Admin Panel.
Your admin URL may look like:
https://example.com/admin
Enter your administrator username and password.
Step 2: Open Product Attributes
From the Magento Admin Panel, go to:
Stores → Attributes → Product
Magento will display the Product Attributes page.
Here you can view and manage existing attributes.
You may see attributes such as:
Color
Size
Weight
Manufacturer
Price
SKU
Brand
The exact list depends on your Magento version and installed extensions.
Step 3: Create a New Product Attribute
To create a custom attribute, click:
Add New Attribute
Magento will open the attribute configuration page.
You will generally configure:
- Default Label
- Catalog Input Type
- Values
- Storefront Properties
- Advanced Attribute Properties
Step 4: Enter the Attribute Label
In the Default Label field, enter a name for the attribute.
For example:
Brand
Other examples include:
Processor
Screen Size
Storage Capacity
Material
Color
Battery Capacity
Use a clear label that customers and administrators can easily understand.
Step 5: Select the Catalog Input Type
The Catalog Input Type for Store Owner determines how the attribute value is entered or selected.
Common options include:
- Text Field
- Text Area
- Text Editor
- Date
- Yes/No
- Dropdown
- Multiple Select
- Price
- Media Image
- Fixed Product Tax
- Visual Swatch
- Text Swatch
The available options can vary depending on your Magento configuration.
Choosing the Correct Input Type
Choosing the correct input type is important because it affects how the attribute is managed and displayed.
Text Field
Use a text field for short values.
Example:
Model Number
ThinkPad-X1
Text Area
Use a text area for longer information.
Example:
Product Features
Yes/No
Use this for simple Boolean choices.
Example:
Water Resistant
Yes
Dropdown
Use a dropdown when customers should select one value.
Example:
Brand
Dell
HP
Lenovo
ASUS
Multiple Select
Use multiple select when a product can have several values.
Example:
Compatible Devices
Laptop
Desktop
Tablet
Visual Swatch
Visual swatches are useful for visual choices such as colors.
For example:
Black
Blue
Red
White
Text Swatch
Text swatches can be useful for choices such as sizes:
S
M
L
XL
Step 6: Add Attribute Options
If you select Dropdown, Multiple Select, Visual Swatch, or Text Swatch, you will need to create attribute values.
For example, for a Brand attribute:
Dell
HP
Lenovo
ASUS
Acer
Click Add Option and enter the required values.
For a Color attribute, you might create:
Black
White
Blue
Red
Silver
For a Size attribute:
Small
Medium
Large
XL
XXL
Step 7: Configure Advanced Attribute Properties
Magento provides additional properties that control how the attribute behaves internally.
Depending on the attribute type, you may see settings such as:
- Attribute Code
- Scope
- Default Value
- Unique Value
- Input Validation
- Add to Column Options
- Use in Filter Options
- Visible on Catalog Pages
- Used in Product Listing
Attribute Code
Magento generates an attribute code based on the label.
For example:
Brand
may become:
brand
Use a simple, descriptive attribute code.
Avoid unnecessary special characters and excessively long codes.
Step 8: Configure Storefront Properties
The Storefront Properties section controls how the attribute can be used on your store.
Important settings can include:
Use in Layered Navigation
This allows customers to filter products using the attribute when supported by your catalog configuration.
For example:
Brand
☐ Dell
☐ HP
☐ Lenovo
Use in Search
This determines whether the attribute can contribute to Magento catalog search.
For example, customers searching for:
16GB RAM
may benefit from having relevant searchable attributes configured appropriately.
Comparable on Storefront
This can allow the attribute to appear when customers compare products.
Use in Search Results Layered Navigation
For applicable attributes, this can help provide filtering options on search results pages.
Step 9: Configure Product Listing Options
Magento also provides settings related to product listings.
Depending on the attribute type and Magento configuration, you may see options such as:
- Used in Product Listing
- Used for Sorting in Product Listing
These settings can determine whether the attribute can be used in product listings or sorting interfaces.
For example, you may want customers to sort products by:
Price
Brand
Rating
Only enable sorting where it makes practical sense.
Step 10: Configure Attribute Scope
Magento supports different attribute scopes, depending on the attribute and configuration.
The common scopes are:
- Global
- Website
- Store View
Global
The attribute value is shared across the Magento installation.
Website
The value can vary between websites.
Store View
The value can be localized or customized for different store views where supported.
This is especially useful for Magento stores operating multiple websites or languages.
Step 11: Save the Attribute
After configuring the attribute, click:
Save Attribute
Magento will add the new attribute to your catalog.
For example, you might create:
Attribute Name: Processor
Input Type: Dropdown
Options:
Intel Core i3
Intel Core i5
Intel Core i7
Intel Core i9
AMD Ryzen 5
AMD Ryzen 7
Step 12: Add an Attribute to an Attribute Set
Creating an attribute does not automatically make it available on every product.
To use the attribute, add it to an appropriate attribute set.
Go to:
Stores → Attributes → Attribute Set
Select the attribute set you want to modify.
For example:
Laptop
You will see the attribute set structure.
Drag your new attribute from the available attributes area into the appropriate attribute group.
For example:
Laptop
├── General
│ ├── Name
│ ├── SKU
│ ├── Price
│ └── Brand
│
└── Technical Specifications
├── Processor
├── RAM
├── Storage
└── Screen Size
Click Save after making the changes.
Step 13: Use the Attribute When Creating a Product
Now create or edit a product.
Go to:
Catalog → Products
Open an existing product or click Add Product.
Select the appropriate attribute set.
The attributes assigned to that set will appear on the product editing page.
For example:
Brand: Lenovo
Processor: Intel Core i7
RAM: 16GB
Storage: 512GB SSD
Color: Black
Enter the appropriate values and save the product.
How to Edit an Existing Product Attribute
Magento allows you to modify existing attributes.
Go to:
Stores → Attributes → Product
Find the attribute you want to change.
Click the attribute.
You can modify settings such as:
- Label
- Input type
- Options
- Default value
- Storefront properties
- Search settings
- Layered navigation settings
After making changes, click Save Attribute.
Important
Be careful when changing the input type of an attribute that is already used by many products.
Changing the attribute structure can affect existing product data or storefront behavior.
Always test important changes before applying them to a production store.
How to Add New Values to an Attribute
Suppose you already have a Color attribute containing:
Black
White
Blue
and you want to add Green.
Go to:
Stores → Attributes → Product
Open Color.
Find the attribute options and click Add Option.
Enter:
Green
Save the attribute.
The new option can then be used for products that use the attribute.
How to Delete an Attribute Option
If an attribute contains an option that is no longer required, open the attribute and locate the option.
Remove the unwanted option and save the attribute.
Before removing an option, check whether products are currently using it.
Deleting or changing catalog values without checking existing products can cause unexpected catalog behavior.
How to Delete a Product Attribute
To remove a custom attribute, go to:
Stores → Attributes → Product
Find the attribute you created.
Open it and use the delete option if available.
Before deleting an attribute, verify that it is not required by:
- Products
- Attribute sets
- Configurable products
- Layered navigation
- Customizations
- Third-party extensions
Removing an attribute that is being used can have unintended consequences.
Managing Attributes for Configurable Products
Attributes are especially important when creating configurable products.
For example, a T-shirt may have:
Color
Size
The available combinations could be:
Black + Small
Black + Medium
Black + Large
Blue + Small
Blue + Medium
Blue + Large
Magento uses suitable product attributes to create configurable product variations.
When preparing attributes for configurable products, make sure:
- The attribute has an appropriate input type.
- It is configured for use with configurable products where required.
- Attribute values are consistent.
- The associated simple products use the correct values.
Example: Creating a Color Attribute
Suppose you sell clothing and want to create a Color attribute.
Go to:
Stores → Attributes → Product → Add New Attribute
Configure it like this:
Default Label: Color
Catalog Input Type: Visual Swatch
Then add values such as:
Black
White
Blue
Red
Green
Configure the appropriate storefront properties and save the attribute.
Next, add the attribute to your clothing attribute set.
You can then use it when creating products or configurable product variations.
Example: Creating a Storage Attribute
For an electronics store, you could create:
Attribute Name: Storage
Input Type: Dropdown
Options:
128GB
256GB
512GB
1TB
2TB
Customers can then use the attribute to understand and filter products based on storage capacity.
Common Product Attribute Problems
Attribute Is Not Appearing on the Product Page
Check whether the attribute has been added to the correct attribute set.
Go to:
Stores → Attributes → Attribute Set
Make sure the attribute is placed inside the appropriate attribute group.
Attribute Is Not Available for Layered Navigation
Check the attribute’s storefront properties.
Verify that the attribute is configured appropriately for layered navigation and that the catalog configuration supports the selected attribute type.
Also verify that the products have valid values assigned.
Attribute Values Are Not Showing
Check that:
- The attribute options were saved.
- The product uses the correct attribute set.
- The attribute has been assigned a value.
- The product is enabled.
- The product belongs to the correct website and store view.
Attribute Is Not Available for a Configurable Product
Check whether the attribute is suitable for configurable products and whether its values are correctly assigned to the associated simple products.
For example:
Color
Size
are common choices for configurable products.
Changes Are Not Visible on the Storefront
Magento caching and indexing can affect when catalog changes become visible.
Check:
System → Cache Management
You can also check indexer status from the command line:
php bin/magento indexer:status
If necessary:
php bin/magento indexer:reindex
Then clear relevant cache:
php bin/magento cache:clean
Best Practices for Magento Product Attributes
1. Plan Attributes Before Creating Them
Avoid creating an attribute for every small piece of information.
Create attributes that have a clear purpose in your catalog.
2. Use Consistent Values
For example, do not use:
Black
black
BLACK
for the same color.
Use one consistent value:
Black
This makes filtering and catalog management cleaner.
3. Use the Correct Input Type
Use dropdowns for predefined choices, swatches for visual selections, and text fields for values that vary from product to product.
4. Keep Attribute Names Clear
Use:
Screen Size
instead of:
Display Specification Information
Short, descriptive names are easier to manage.
5. Avoid Unnecessary Attributes
Too many attributes can make product management complicated and may create excessive filtering options.
Only create attributes that provide meaningful value.
6. Use Attribute Sets
Group related attributes into appropriate attribute sets.
For example:
Laptop Attribute Set
→ Processor
→ RAM
→ Storage
→ Screen Size
→ Operating System
This makes product creation faster and more consistent.
7. Test Storefront Filters
If an attribute is used for layered navigation, test it from the customer side.
Make sure the filter returns the expected products.
Frequently Asked Questions
What are product attributes in Magento?
Product attributes are properties used to describe products, such as color, size, brand, material, storage, and processor.
Where can I manage product attributes in Magento 2?
Go to:
Stores → Attributes → Product
From there, you can create and edit product attributes.
What is an attribute set in Magento?
An attribute set is a collection of attributes used when creating or managing a particular type of product.
Can I create custom attributes in Magento?
Yes. Magento allows administrators to create custom product attributes based on the requirements of the store.
Can product attributes be used for filters?
Yes. Suitable attributes can be configured for layered navigation and other storefront filtering features.
Can attributes be used for configurable products?
Yes. Attributes such as size and color are commonly used to create configurable product variations.
Can I delete a Magento product attribute?
Custom attributes can generally be deleted, but you should first check whether the attribute is being used by products, attribute sets, configurable products, or extensions.
Conclusion
Product attributes are one of the core building blocks of a Magento 2 catalog. They allow you to organize product information, create configurable products, improve filtering, and provide customers with useful product specifications.
The basic workflow is:
Stores
→ Attributes
→ Product
→ Add New Attribute
→ Configure Attribute
→ Save
→ Attribute Sets
→ Add Attribute to Set
→ Assign Values to Products
→ Test Storefront
A well-planned attribute structure makes catalog management easier and provides customers with a better shopping experience. Before creating large numbers of attributes, plan your product data carefully and use consistent values throughout your catalog.