How to export products along with all attributes & images/video using command line?
-
firebearstudio.com/blog/…– Padhiyar GaurangCommented Dec 13, 2019 at 6:06
-
@PadhiyarGaurang I cudnt find info on exporting products via cli on the blog link. It was about Extension.– ShaileshCommented Dec 13, 2019 at 9:03
-
OHH!! my mistake it was import not export. Apologies.!– Padhiyar GaurangCommented Dec 13, 2019 at 9:11
-
@PadhiyarGaurang even for import,..it is about Extension.. not CLI– ShaileshCommented Dec 13, 2019 at 9:27
-
You need to create your own command and write logic for export :)– PawanCommented Dec 13, 2019 at 14:06
2 Answers
Prerequisites: The Add Secret Key to URLs option is set to Yes. The option is configured in the Commerce Admin under Stores > Configuration > Advanced > Admin > Security.
In the Admin, navigate to System > Data Transfer > Export.
Select
Entity Type: Products Export File Format: CSV Field Enclosure: leave unchecked. Click Continue.
The following message is displayed: "Message is added to queue, wait to get your file soon".
Expected result
The .csv file with the exported products is displayed in the grid in a couple of minutes.
Actual result
The .csv file with the exported products is not displayed in the grid in 10 minutes or more.
Cause A known issue with the Export functionality in the Adobe Commerce application part version 2.3.2.
Solution There are two possible solutions for the issue:
Disable the Add Secret Key to URL option. Run the
bin/magento queue:consumers:start exportProcessor
For Cpanel
php bin/magento queue:consumers:start exportProcessor
command manually, and optionally configure it to be run by cron. See details for both options in the following paragraphs.
Use the following command to run an export job in Magento 2 via CLI:
php -f bin/magento export:job:COMMAND JOB_ID
export:job:run