I was used to do something like
update wp_posts set post_content = replace(post_content,'', '');
This seems not to work anymore for texts that come from Gutenberg.
Any idea/update for this?
I was used to do something like
update wp_posts set post_content = replace(post_content,'http://dev.example/website', 'http://www.website');
This seems not to work anymore for texts that come from Gutenberg.
Any idea/update for this?
Share Improve this question asked Oct 23, 2019 at 18:14 Luca ReghellinLuca Reghellin 1,6422 gold badges21 silver badges45 bronze badges 1 |1 Answer
Reset to default 0I just found out the reason. It's because I'm using ACF Pro as Blocks. The data will be written in database in json format, and the urls will escape all the slashes ad double quotes. So for example
src=\"http:\/\/dev.example\/website\/wp-content\/uploads\/2019\/10\/identity.jpg\"
So I should add a row like this:
update wp_posts set post_content = replace(post_content,'http:\/\/dev.example\/website', 'http:\/\/www.website');
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745057216a4608740.html
WHERE "ID" < 100
clause. – WebElaine Commented Oct 23, 2019 at 18:45