Rate this post


We have known about how to add custom attribute to product in a lession before, now I will show you how to add custom attribute for customer.

  • Firstly, you need create file InstallData.php in your Setup folder:

  • After all of that, you need open SSH and run command:

php magento setup:upgrade

  • Then clear cache for sure every working:

php magento cache:flush

The steps I mention above is the shortest process for you to Add Custom Attribute to Customer Programmatically in Magento 2 . With this guide, you can manage the Custom Attribute in Magento 2 easily. Every store has a Custom Attribute in Magento 2 with many attributes.

Thank you for reading this post and see you in other posts from Magestore!


We also contribute great content of Magento Download for FREE (all versions)


magento download

How to Fix Issue "No Region Found within the Locale..." in Magento 2
How to Create CMS Pages by Source Code in Magento 2

Leave a Reply

Your email address will not be published. Required fields are marked *