0

Magento 2 delete Meta Name Meta Title Meta Description ALL products

Please can someone let me know if its possible to delete the Meta Values for all products in my store

These were added during import and we want to remove them as we want to use extension to auto generate these values.

Is there anything that can be done via MYSQL to quickly remove all the entries for them.

I dont want to export all products and then update with blank it will take forever as there are 30000 + products

1
  • Did you try my solution ?
    – Pawan
    Oct 6, 2020 at 6:24

1 Answer 1

0

Note: Please take backup of database prior to run below queries:

First we need to get attribute_id for Meta Title, Meta Description and Meta Keywords. We can do this is a subselect.

Meta Title:

DELETE FROM catalog_product_entity_varchar 
WHERE attribute_id = (
    SELECT attribute_id FROM `eav_attribute` 
    WHERE attribute_code = 'meta_title' AND entity_type_id ='4');

Meta Description:

Delete FROM catalog_product_entity_varchar 
WHERE attribute_id= (
   SELECT attribute_id FROM `eav_attribute` WHERE attribute_code = 
   'meta_description' AND entity_type_id ='4');

Meta Keyword:

Delete FROM catalog_product_entity_text 
WHERE attribute_id= (
   SELECT attribute_id FROM `eav_attribute` WHERE attribute_code = 
   'meta_keyword' AND entity_type_id ='4');

Hope above will help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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