• Resolved shortysbest

    (@shortysbest)


    I am having an issue with my wordpress post images. (I am new to wordpress, also).

    My wordpress installed in a folder called, “wordpress” I however changed it to “blog” (and changed the two links in settings to “blog”. Everything is working fine, except for some images in my wordpress blogs are not showing up because they are still trying to load from “www.mysite.com/wordpress/wp-content/” when they need to load from “www.mysite.com/blog/wp-content/”.

    Now it’s odd because certain post images (The large ones it appears) are loading from the correct path, just not the small images.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Cleanforest.co

    (@noamcleanforestsolutionscom)

    Hello,

    It is possible that your WordPress theme has image links which are hardcoded to use the old URL. Open your WordPress theme in an editor and search for /wordpress and replace it with /blog.

    Another possibility is that your database still contains the old image URLs.

    If you have access to a database editor such as phpMyAdmin, you can update the URLs as explained here: http://www.refreshinglyblue.com/2009/03/29/wordpress-uploaded-images-how-to-change-absolute-url/

    You can try the following two SQL statements:

    UPDATE wp_posts set post_content=REPLACE(post_content, 'www.yoursite.com/wordpress/', 'www.yoursite.com/blog');

    UPDATE wp_posts set post_content=REPLACE(post_content, 'wordpress/wp-content', 'blog/wp-content');

    The Search and Replace plugin may be useful as well: http://wordpress.org/extend/plugins/search-and-replace/

    Remember to have a backup of the database before making any changes!

    Please let us know if that worked out for you!

    Thread Starter shortysbest

    (@shortysbest)

    Hey CFS,

    Thank you. I had tried everything you had said before (I had spent probably 3-4 hours looking through the files and didn’t find anything), but it was hardcoded in the database post… I can’t believe I hadn’t checked that.. but thanks!!

    Cleanforest.co

    (@noamcleanforestsolutionscom)

    My pleasure 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change posts image directory from "wordpress/wp-content/"’ is closed to new replies.