Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SQL Statement Replace Smart Curly Quotes with Regular Quotes in WordPress. I was migrating an old wp site with a ton of content I noticed a lot of curly quotes / smart quotes and the curly single quotes. My OCD hates that and it's not proper and looks bad to bots so I wanted to batch change them all to regular ascii quotes. This statement handle…
UPDATE wp_posts SET post_content = replace(replace(replace(post_content, '', '"'), '', '"'), '', '''');

This comment has been minimized.

Copy link

@earthbound19 earthbound19 commented Mar 21, 2017

Thanks. It actually kinda grieves me to make use of this; "correct" typography uses curly quotes, but in my case a self-hosted search engine chokes on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment