How to increase the limit of meta_description in magento1.9 .When we have import bulk of products during CSV then showing meta_description limit error.Please give me any solution?


You can manually change the meta_description field size by logging into database and then goto table eav_attribute.

Then change the backend_type to text from varchar. Default is varchar which is maximum of 255 characters. If you change this to text then it will work like the description and short description fields.

  • when i have change varchar to text but problem is all ready data save in varchar table so not fetch in frontend – Devidas Aug 6 '18 at 7:29
  • You need to export meta description to your csv then after the change you need to import those again. As varchar will not save more than 255 character, you need to change it to text. – Sukumar Gorai Aug 6 '18 at 7:34

This is worked for me. Firstly, run the following code to change the attributes from varchar to text and move them into the right tables. Make sure you back up your website and database first!


SET @attribute_id = (SELECT attribute_id FROM eav_attribute WHERE entity_type_id = 4 AND attribute_code = "meta_description"); UPDATE eav_attribute SET frontend_class = 'validate-length maximum-length-2000' WHERE attribute_code = 'meta_description'; 

UPDATE eav_attribute SET backend_type = 'text' WHERE attribute_id = @attribute_id; UPDATE eav_attribute SET note = 'Maximum 2000 chars' WHERE attribute_code = 'meta_description'; 

INSERT INTO catalog_product_entity_text (entity_type_id, attribute_id, entity_id, store_id, value) SELECT entity_type_id, attribute_id, entity_id, store_id, value from catalog_product_entity_varchar WHERE attribute_id=@attribute_id AND entity_type_id=4; 

DELETE FROM catalog_product_entity_varchar where attribute_id = @attribute_id; 


First of all here are some change releted to meta descriptions by google.

While Google showed snippets with long meta descriptions (around 320 characters) in the past few months, the snippets are now back to their old length (between 150 and 170 characters). A few weeks ago, we published the results of our research in which we experimented with long and short meta descriptions on Yoast.com. All of the long meta descriptions we added to articles on Yoast.com, that were visible in the search results pages earlier, are now all replaced by short ones. https://yoast.com/shorter-meta-descriptions/

Rather then do this manually in database you can create setup file in magento to update database

You can create file in your module on below path


Here is more information related to setup script https://inchoo.net/magento/magento-install-install-upgrade-data-and-data-upgrade-scripts/

Here is the code that you can use to update backend type for meta_description

$installer = $this;


$installer->run("UPDATE `eav_attribute` SET `backend_type` = 'text' WHERE `eav_attribute`.`attribute_code` = 'meta_description' AND `eav_attribute`.`entity_type_id` = '4' ; ");


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.