WordPress.org

Ready to get started?Download WordPress

Forums

How to change media URL (7 posts)

  1. satimis
    Member
    Posted 2 months ago #

    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
    http://wordpress.org/support/topic/media-file-url-in-which-tablefield-in-sql-database
    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

    Rgds
    satimis

  2. Dave Naylor
    Member
    Posted 2 months ago #

    This search and replace plugin can help:

    http://wordpress.org/plugins/search-and-replace/

  3. satimis
    Member
    Posted 2 months ago #

    Hi,

    Thanks for your advice.

    Have "Search & Replace" plugin installed. Just tried it but couldn't resolve how to use it correctly.

    I expect changing:
    Media Library
    Link To [Media File ]
    [http://domain_old/wp-content/uploads/2013/11/ipo_02.jpeg ]

    to:
    [http://domain_new/public_html/blog/wp-content/uploads/2013/11/ipo_02.jpeg ]

    But it changed that URL on "Text" of the webpage

    Please help. Thanks

    Rgds
    satimis

  4. Dave Naylor
    Member
    Posted 2 months ago #

    Just run with:

    domain_old/wp-content

    to

    domain_new/public_html/blog/wp-content

  5. satimis
    Member
    Posted 2 months ago #

    Hi,

    Still the same. Changes made on "Text" only.

    On
    Insert Media page
    Attachment display settings
    Link To [Media File ]
    http://domain_old/wp-content/uploads/2013/11/shell_co.jpeg

    I expect replacing all media links to http://domain_new/public_html/blog/wp-content/uploads/

    Under "Search in"
    Any box I have to select ?

    Thanks

    satimis

  6. Dave Naylor
    Member
    Posted 2 months ago #

    Hmmm, you could always try this this stand alone tool

  7. satimis
    Member
    Posted 2 months ago #

    Hi,

    The link provided by you may help me out.

    The links I need to change are on the database. Unfortunately I couldn't run MySQL commands checking them which feature is disabled by Godaddy.

    It is still in beta version. I'll keep eyes on it.

    Thanks

    Rgds
    satimis

Reply

You must log in to post.

About this Topic