WordPress.org

Ready to get started?Download WordPress

Forums

changing from temp url to permanent url: image paths (3 posts)

  1. stockhopstudio
    Member
    Posted 1 year ago #

    It's been a while since I've done this and i can't remember quite how it works. Right now we're developing a website on a temporary URL hosted through Bluehost. That's because the client already has a website and wants to keep it live until the new one is developed. Eventually we will change the DNS settings at the registrar to point to the Bluehost servers and at that time, we can change the name of the site from
    66.147.242.151/~umlfcom/ to just show the real web address: umlf.com. How do I keep the image paths from breaking when we change over? If I remember correctly, I need to go into the settings panel and change permalinks, then change them back.

  2. bh_wp_guy
    Member
    Posted 1 year ago #

    After you change the site URL settings to use the domain instead of the temporary URL, I believe you have to update the post content and GUID entries in the database for the different uploaded images. I would recommend backing up the database before completing this process but if you go into your phpmyadmin tool on your hosting service and select the database - then select the SQL tab that should let you run this query:

    Put something like the following code into it. (Be sure to replace the URLs with your real old and new locations.):

    UPDATE wp_posts
    SET guid =
    REPLACE(
    guid,
    "http://66.147.242.151/~umlfcom",
    "http://www.umlf.com"
    );

    Click “GO” and then click the SQL tab once more and run this one as well:

    UPDATE wp_posts SET post_content =REPLACE(
    post_content,
    "http://66.147.242.151/~umlfcom",
    "http://www.umlf.com"
    );

    Click "Go"

    Just in case a mistake is made be sure to backup your database before running queries like this on it. I hope this helps you.

  3. wp_bh_fan
    Member
    Posted 1 year ago #

    You might also try the velvet bluest replace URL plugin: http://wordpress.org/extend/plugins/velvet-blues-update-urls/ As bh_wp_guy mentioned though, a backup of the database is always a good idea. Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.