Support » How-To and Troubleshooting » How to change media URL

How to change media URL

  • Hi all,

    I have moved domain_old.com from Godaddy server1 to server2 and renamed it to domain_new.com.

    The site is working with media on pages displayed correctly but all media links are still pointing the old URL, domain_old/wp-content/uploads/ etc. All media files are already on /domain_new/wp-content/uploads/ etc. I can’t change the URL of the media manually.

    I have searched a while and could not find a link on Internet to help me out.

    I found following post
    losimo, Member, Posted 3 years ago #

    The file URL in this field are stored as absolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:
    UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

    But I couldn’t resolve where shall I change the mentioned SQL query.

    Please help. Or is there another solution? Thanks


Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to change media URL’ is closed to new replies.
Skip to toolbar