Cleaning up WooCommerce shortcodes in product descriptions for Shopify (2026)
How to identify and remove WooCommerce shortcodes, plugin-specific HTML, and WordPress template tags that break product descriptions when migrated to Shopify.
WooCommerce product descriptions frequently contain WordPress shortcodes — placeholders like [su_button], [vc_row], or [product_page] — inserted by page builder plugins or WooCommerce extensions. When exported and imported into Shopify, these shortcodes render as visible raw text on product pages, looking like: [product_page id="123"]. This guide covers how to identify, clean, and replace all shortcode content before migrating to Shopify.
Common WooCommerce shortcodes found in product descriptions
Page builder shortcodes (render as broken text on Shopify)
[vc_row],[vc_column],[vc_column_text]— WPBakery / Visual Composer[et_pb_section],[et_pb_row],[et_pb_text]— Divi Builder[fusion_builder_container],[fusion_text]— Avada / Fusion Builder[tatsu_section],[tatsu_row]— Tatsu page builder- Elementor doesn't use shortcodes (uses DB post meta), but some Elementor plugins inject shortcodes
Plugin shortcodes
[su_button],[su_tabs],[su_accordion],[su_table]— Shortcodes Ultimate[wc_cart_button],[add_to_cart]— WooCommerce shortcodes in descriptions[product_page id=""]— Embedded product reference[wp_review],[wpreview]— Review plugins[tablepress id=""]— TablePress tables[contact-form-7]— Contact forms embedded in product descriptions[gravityform id=""]— Gravity Forms in descriptions[pdf-embedder],[pdfviewer]— PDF embedding plugins[video_lightbox_youtube],[youtube]— Video plugins
WordPress/WooCommerce native shortcodes
[caption]— WordPress image caption shortcode (renders as plain text)[gallery]— WordPress gallery shortcode[woocommerce_messages]— Displays checkout messages[recent_products],[featured_products]— WC dynamic product lists
Finding shortcodes in your WooCommerce database
Method 1: MySQL direct query (most comprehensive)
-- Find all products with shortcodes in description or short_description
SELECT ID, post_title, post_content, post_excerpt
FROM wp_posts
WHERE post_type = 'product'
AND post_status = 'publish'
AND (
post_content LIKE '%[%]%'
OR post_excerpt LIKE '%[%]%'
);
This finds any post content containing brackets — export results to review which shortcodes are present.
Method 2: WooCommerce export + text analysis
- Export products to CSV via WooCommerce Admin → Products → Export
- Open CSV in Excel or Google Sheets
- Use FIND to search for "[" in Description and Short Description columns
- Or: use a text editor with regex — search for
[[a-zA-Z_]+[^]]*]to match shortcode patterns
Method 3: WordPress CLI (WP-CLI)
wp post list --post_type=product --fields=ID,post_title,post_content --post_status=publish --format=csv | grep "["
Bulk shortcode removal strategies
Option 1: SQL find-and-replace (direct DB)
-- Remove WPBakery shortcodes from product descriptions
-- WARNING: Always backup your database before running SQL updates
UPDATE wp_posts
SET post_content = REGEXP_REPLACE(
post_content,
'\[vc_[^\]]*\]',
''
)
WHERE post_type = 'product';
-- Repeat for other shortcode patterns
Option 2: Better Search Replace plugin (WordPress admin)
- Install Better Search Replace in WooCommerce admin
- Run regex find-and-replace on
wp_poststable - Pattern to match and remove WPBakery:
/[vc_[^]]+]/→ replace with empty string - Run dry-run first to count occurrences before committing
Option 3: Custom PHP script (recommended for large catalogs)
<?php
// run-cleanup.php — run once, delete after
require 'wp-load.php';
$products = get_posts(['post_type' => 'product', 'posts_per_page' => -1]);
foreach ($products as $product) {
$clean_content = $product->post_content;
// Strip WPBakery shortcodes
$clean_content = preg_replace('/\[vc_[^\]]*\]/', '', $clean_content);
$clean_content = preg_replace('/\[\/vc_[^\]]*\]/', '', $clean_content);
// Strip Shortcodes Ultimate
$clean_content = preg_replace('/\[su_[^\]]*\]/', '', $clean_content);
$clean_content = preg_replace('/\[\/su_[^\]]*\]/', '', $clean_content);
// Strip WooCommerce embeds
$clean_content = preg_replace('/\[wc_[^\]]*\]/', '', $clean_content);
if ($clean_content !== $product->post_content) {
wp_update_post(['ID' => $product->ID, 'post_content' => $clean_content]);
echo "Cleaned: " . $product->post_title . "
";
}
}
echo "Done.";
?>
Replacing shortcodes with Shopify-compatible HTML
Simply removing shortcodes loses content. For shortcodes that generate real content, replace with static HTML:
Accordion / tabs (su_accordion → HTML details/summary)
<!-- WooCommerce: [su_accordion][su_spoiler title="Features"] Content [/su_spoiler][/su_accordion] -->
<!-- Shopify-compatible replacement: -->
<details>
<summary>Features</summary>
<p>Content</p>
</details>
Tables (TablePress → HTML table)
<!-- WooCommerce: [tablepress id="3"] -->
<!-- Export table from TablePress → export to HTML table → paste static HTML into Shopify description -->
<table>
<thead><tr><th>Column 1</th><th>Column 2</th></tr></thead>
<tbody><tr><td>Value</td><td>Value</td></tr></tbody>
</table>
YouTube videos (video shortcodes → iframe)
<!-- WooCommerce: [youtube id="VIDEOID"] -->
<!-- Replace with: -->
<iframe
src="https://www.youtube.com/embed/VIDEOID"
width="560"
height="315"
allowfullscreen>
</iframe>
PDF embed (pdf-embedder → Google Docs viewer link)
<!-- WooCommerce: [pdf-embedder url="https://...file.pdf"] -->
<!-- Shopify: use a plain link or Google Docs viewer -->
<a href="https://yourcdn.com/file.pdf" target="_blank">Download PDF (opens in new tab)</a>
WPBakery / Divi content in product descriptions
Products edited in WPBakery or Divi store their content as a mix of shortcodes and raw HTML. After removing the shortcode wrappers, you're left with the actual text content. However, the layout (columns, sections) is lost — you need to rebuild the content as clean HTML:
- View each affected product page on WooCommerce before migration and screenshot the rendered layout
- Use screenshots as reference to rebuild the content as clean HTML
- Alternatively: use Divi/WPBakery export to generate a rendered HTML snapshot of the content
- For large catalogs: prioritize top-selling products (top 20% by revenue) for manual content review; bulk-strip the rest
HTML sanitization: other artifacts to clean
Beyond shortcodes, WooCommerce product exports commonly contain:
- Inline WordPress CSS classes:
class="aligncenter",class="wp-image-123"— harmless but can be stripped for cleanliness - WordPress image IDs:
<img class="wp-image-456">— WordPress-specific attribute, not needed in Shopify - Absolute WordPress URLs:
src="https://youroldstore.com/wp-content/uploads/..."— these still work post-migration if WP hosting stays up, but should be re-uploaded to Shopify Files for permanence - Empty paragraph tags: WP editor often inserts
<p> </p>for spacing — these create visual gaps in Shopify product descriptions - Script tags: Some plugins embed
<script>tags in descriptions. Shopify strips these for security but the stripped content may look broken.
Shortcode cleanup checklist
- Back up WooCommerce database before any bulk operations
- Export product CSV and search for shortcode patterns
[and] - Categorize shortcodes found: page builder vs plugin vs native WC vs video/media
- Remove page builder wrappers (vc_, et_pb_, fusion_) — extract inner content
- Replace accordion shortcodes with HTML details/summary elements
- Export and replace TablePress tables with static HTML tables
- Replace video shortcodes with standard iframes
- Replace PDF embeds with download links
- Run cleanup script and re-export to CSV for Shopify import
- Spot-check 10% of products: view rendered content on Shopify store before going live
- For complex Divi/WPBakery products: manual content rebuild from screenshot reference for top-selling items
The shortcode cleanup step is tedious but essential — visible raw shortcode text on product pages is unprofessional and damages conversion rate immediately. The discovery phase (finding all affected products) is usually quick. The actual cleanup scales with how extensively page builders were used. A store with 500 simple products where only 10% used Shortcodes Ultimate for accordion tabs is a half-day cleanup. A store where every product description was built in Divi may require a full week of content migration work.
Migrate your store with k-sync
Connect your WooCommerce store, validate your products, and push to Shopify in minutes. Free for up to 50 products.
Get started freeRelated reading
Migrating a luggage and travel accessories store from WooCommerce to Shopify (2026)
How to migrate a luggage, travel bags, or travel accessories WooCommerce store to Shopify — luggage specifications, airline compliance, TSA lock, warranty and durability claims, and luggage retail Shopify setup.
Migrating a motorcycle accessories store from WooCommerce to Shopify (2026)
How to migrate a motorcycle accessories, biker gear, or motorbike parts WooCommerce store to Shopify — helmet safety standards, CE-rated protective clothing, type approval for parts, fitment compatibility, and motorcycle retail Shopify setup.