How to quickly replace text in Wordpress pages?

Translate the website to a secure Protocol, you need to replace quick links to images on https. It pages not records.
This code does not work.

update wp_posts set post_content =
replace(post_content,'Text to search','Text to replace');
March 23rd 20 at 18:54
1 answer
March 23rd 20 at 18:56
Where do you execute this code?

In General the only fast and adequate way to do that is search-replace in the database. You can do this directly in the database itself, but to use WP-CLI and its command wp search-replace.

The syntax of your command looks fine:

UPDATE table_name
SET column_name=REPLACE( column_name, 'text_to_find', 'replace_with_this' );

Find more questions by tags WordPress