Magento lowercase all product titles

Magento lowercase all product titles

September 12, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento lowercase all product titles

Converting Magento Product Titles to Lowercase: A Safe and Effective Method

If you’re facing the challenge of converting all your Magento product titles to lowercase without risking data corruption or loss, you’ve come to the right place. In this guide, I’ll walk you through a safe and reliable way to achieve this using MySQL queries and Magento’s built-in functionality.

The Problem: Capitalized Product Titles in Magento

Magento allows users to add products with capitalized titles during the initial setup or product creation process. While this isn’t an issue by itself, it can lead to inconsistencies in your storefront design and SEO performance if left unaddressed.

The Solution: A Two-Step Approach

To solve this problem without compromising your database, I recommend a two-step approach that leverages Magento’s data model and MySQL queries.

Before we proceed with the recommended method, let me briefly discuss an option you might be tempted to try – updating the catalog_product_entity table directly via a raw SQL query:

UPDATE catalog_product_entity SET name = LOWER(name);

While this query seems straightforward, I strongly advise against using it. Directly manipulating core Magento tables can lead to data inconsistencies and compatibility issues with future updates.

Instead of updating the database directly, we’ll use Magento’s built-in Mage::getSingleton('catalog/product')->updateAttributes() method along with a custom script. This approach ensures that the changes are applied while maintaining data integrity and compatibility.

Creating a Custom Script to Convert Product Titles

  1. Create a new PHP file in your Magento root directory, e.g., convert_product_titles.php.

  2. Add the following code to the file, replacing YOUR_STORE_ID with the actual ID of your Magento store:

<?php
require_once 'app/Mage.php';
Mage::init('default');

$storeId = YOUR_STORE_ID;
$productCollection = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect('*')
    ->addStoreFilter($storeId);

foreach ($productCollection as $product) {
    $lowercaseName = strtolower($product->getName());
    $product->setData('name', $lowercaseName);
}

$products = Mage::getModel('catalog/product')->updateAttributes(
    array($product->getId()),
    array(
        'name' => $lowercaseName
    ),
    $storeId
);

if ($products) {
    echo "Product titles converted successfully.\n";
} else {
    echo "Failed to convert product titles.\n";
}
  1. Run the script by executing the following command in your terminal:
php -f /path/to/your/magento/installation/convert_product_titles.php

Verifying the Changes

After running the script, log in to your Magento admin panel and navigate to “Catalog” > “Manage Products”. You should now see that all product titles have been successfully converted to lowercase while preserving other data attributes.

Conclusion: Safely Converting Magento Product Titles to Lowercase

In this guide, we’ve explored a safe and reliable method for converting all your Magento product titles to lowercase using the built-in updateAttributes() method. By following this approach, you can maintain data integrity, ensure compatibility with future updates, and avoid potential database corruption.

Remember that it’s essential to test any changes in a development environment before deploying them to your live store. This will help you identify and resolve any issues that may arise during the conversion process.

If you’re looking for more advanced Magento customizations or need expert assistance with your e-commerce projects, feel free to reach out to us at Laravel Company. Our team of certified Magento developers is dedicated to helping businesses like yours achieve their online goals through innovative and secure solutions.

Catalog Database Performance API

Our network