The problem: the worpress site is developed locally by my team. When we finish, we will put it online. Now, changing the siteurl, home and ossdl_off_cdn_url in the database table wp_optionsis easy to change. But we have to change all URL in post data, especially the links that lead to the images.

We want, when we post a new image, that is registered in the database by:

<img src="/wp-content/etc/....

And not:

<img src="http://siteurl/wp-content/etc/....

There is a plugin or a mod to do so?

We have already ran this query:

UPDATE wp_posts SET `post_content` = REPLACE (`post_content`, 'src="http://siteurl', 'src="');

To cancel all reference URL and get image directly from the site root folder /wp-content but we do not want to do this also for future images.

Read more here: Change database image location for transportability


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: