I am new to Magento. I am trying to do things programmatically.

Is there another way to add simple product programmatically than Programmatically create a simple product in magento 2 this.

I don't want to add a file in the root folder

  • From where you want to create? Aug 28, 2018 at 11:09
  • @SukumarGorai is it a good way to add a file in the root? I have no idea what are the other ways to add product Aug 28, 2018 at 11:25
  • No its not a good way. But I want to from where you want to upload simple products programmatically. Do you want specific url from where you can upload products? Aug 28, 2018 at 11:27

1 Answer 1


You can add products using

  1. REST API, You can check this thread if you are okay with using APIs
  2. You can use CSV files to upload products to Magento

Using REST API can be the alternative that you might be looking for rather than creating them using a script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.