WordPress.org

Ready to get started?Download WordPress

Forums

will my image path be broken ones the site is live? (4 posts)

  1. krystiank
    Member
    Posted 4 years ago #

    I am working on the development site with a subdomain, like dev.mysite.com. I just noticed, and never thought about it. that once the site will be live all my images might be broken.

    I will eventually make the site live http://www.mysite.com but I noticed that all images on my posts begins with http://dev.mysite.com/wp-content/themes...

    Should I update them to be relative to the site? /wp-content/themes/...

    Or ones I update the web site URL in general setting all my paths to my images will be updated as well.

    Please let me know,
    Krystian

  2. Micah Cooksey

    Posted 4 years ago #

    You can use <?php bloginfo('url'); ?> to have it dynamically generate your domain. For instance, your image link would be similar to<img src="<?php bloginfo('url'); ?>/wp-content/themes/..." />

  3. krystiank
    Member
    Posted 4 years ago #

    I totally agree. The thing is the images are inserted into the posts, not in the templates.

  4. Mark / t31os
    Moderator
    Posted 4 years ago #

    Fix any old paths using a search and replace.
    http://wordpress.org/extend/plugins/search-and-replace/

    Plugin has support for various fields including post content.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.