I have set a new cdn to serve images cdn.example.net
. all my new uploads works fine with it , but my old images has path example.net
.
I tried to use WP_CONTENT_URL
to change images but it reflects in plugins,themes file to be broken . so I needed to upload all my plugins,themes files [That's not a good option as every new plugin I'll need to install , I will need to uploads it's files ] .
I tried using SQL UPDATE wp_posts SET post_content = REPLACE (post_content,'http://example.net/blog','http://cdn.example.com.net');
. it tells me that there is row matched
but with no rows affected
I managed to solve this issue by editing my wp-config.php
First one will change all [Images,Plugins,Themes] path to another url , your cdn as an example
define( 'WP_CONTENT_URL', 'your_cdn_website_url/wp-content' );
I left this url so old one so plugins won't be broken
define( 'WP_PLUGIN_URL', 'your_website_url/wp-content/plugins' );