I need to How can i bulk export Products like sku, products name, request path and Target path, is there any way I can bulk download request path and target path url.

enter image description here

  • 1
    Are you looking for a magento feature to export or you are free to add a custom php script for this?
    – Nidheesh
    Commented Sep 22, 2016 at 11:24
  • 1
    just i need to export request and target path url ,
    – Gem
    Commented Sep 22, 2016 at 12:04

3 Answers 3


you can export the id, sku, name and request & target paths with this sql:

select e.entity_id, e.sku, ev.value as name,  u.request_path, u.target_path 
from catalog_product_entity e 
inner join catalog_product_entity_varchar ev on ev.entity_id = e.entity_id and ev.attribute_id = 
    (select attribute_id from eav_attribute a inner join eav_entity_type et on et.entity_type_id = a.entity_type_id where a.attribute_code = 'name' and et.entity_type_code = 'catalog_product') 
inner join core_url_rewrite u on u.id_path = concat('product/', e.entity_id) and u.is_system=1 and options is null;

you can either run this query from the command line as mysql -E "paste your query here" > outfile.tsv generating a tab-separated file

or from phpmyadmin, which allows exporting the current result set quite easily.

ultimately you can use INTO OUTFILE '/tmp/outfile.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

if you need more product attributes, you would need a script, since the sql would become very difficult to read

  • also, if you need all rewrites (custom or system), just remove the "u.is_system = 1 and options is null" part from the query
    – Cristi
    Commented Oct 5, 2016 at 5:59


    $fp = fopen('exports.csv', 'w+');
    $csvHeader = array('request_psth',"target_path");
    fputcsv( $fp, $csvHeader,",");
    foreach($data as $row)
        fputcsv($fp, array($row->getData('request_path'),$row->getData('target_path')), ",");

use this script it will generate csv in root.

  • just i past this code in root folder and run ?? right ??
    – Gem
    Commented Sep 22, 2016 at 12:06
  • 1
    how can i run this script
    – Gem
    Commented Sep 22, 2016 at 12:14
  • ya u create test.php file in root and run this file it will generate csv file in root Commented Sep 22, 2016 at 12:20
  • i.imgur.com/41q3Um8.png
    – Gem
    Commented Sep 22, 2016 at 12:25
  • does right ?....
    – Gem
    Commented Sep 22, 2016 at 12:25

Via phpMyAdmin

Well, you could simply do it via phpMyAdmin.

Go to the core_url_rewrite table and click the export tab.

Then choose CSV in the format dropdown.

Click Export, you're done.

Via MySQL command line

SELECT request_path,target_path
FROM core_url_rewrite
INTO OUTFILE '/tmp/rewrites.csv'

Just replace /tmp/rewrites.csv with the path that fits your needs

  • Your first option okay, but how can i match by sku, Actually i need sku, request path, and target path, so only i can match all products in my store from other site.
    – Gem
    Commented Oct 5, 2016 at 4:48

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.