Created
November 8, 2024 22:26
-
-
Save geraldurbas/0af131713416e40cdfa3bc363c63a344 to your computer and use it in GitHub Desktop.
SQL: replace Lightspeed Webshop URLs in WooCommerce Exported Products
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT post_content, | |
| REGEXP_REPLACE(post_content, 'https://static\\.webshopapp\\.com/shops/1234/files/[0-9]+/', 'https://new-url.com/fixed/path/') | |
| FROM `db606006_1`.`eucph_posts` | |
| WHERE | |
| post_content REGEXP 'https://static\\.webshopapp\\.com/shops/1234/[^\"\\s]*'; | |
| EXPLAIN UPDATE eucph_posts | |
| SET post_content = REGEXP_REPLACE(post_content, 'https://static\\.webshopapp\\.com/shops/1234/files/[0-9]+/', 'https://rechtwp.de/wp-content/uploads/2024/11/') | |
| WHERE post_content REGEXP 'https://static\\.webshopapp\\.com/shops/1234/[^\"\\s]*'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment