After changing WordPress Address and Site Address in settings, media URL in Post
-
Hi,
I’m working on a new theme on my local machine for an existing live site. I was given the live site database and the contents of “/wp-content/uploads” directory to work with.
I imported the database and updated the ‘home’ and ‘siteurl’ option values to match my local machine.
Then I notice to my surprise looking at Chrome network inspector, the user uploaded media files are actually loading from my local machine (ie. https://localhost/wordpress/wp-content/uploads/2020/03/image.jpg instead of https://livesite.com/wordpress/wp-content/uploads/2020/03/image.jpg ) I check the post content in the database, the media URLs are still the live site ones. So there must be some automatic filter that changes these media URLs before it is output to the browser? I thought if we change a WordPress site URL, we also had to manually update all those media URLs in ‘post_content’ in the database manually?
- The topic ‘After changing WordPress Address and Site Address in settings, media URL in Post’ is closed to new replies.