Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]

You should try running WP-CLI’s search-replace command.

$ wp search-replace 'http://example.com' 'https://example.com' --all-tables

But you said these URLs are placed from a shortcode? Then you need to find out what this shortcode actually is doing. As it not necessarily has saved the URLs to the database. Maybe it’s a setting in the shortcode and then the URL gets generated accordingly? You could also dump your database (maybe with WP-CLI again: $ wp db export test.sql) and open that with a text editor to see if you still can find the old URL in there.

Leave a Comment