WordPress.org

Ready to get started?Download WordPress

Forums

Changing Name of Image Subdirectory (4 posts)

  1. dworsky
    Member
    Posted 7 years ago #

    I have an advertising-related blog, and store the graphics files (of ads) in a subdirectory called /ads .

    Some readers see no graphics on my site because of spyware-type software they are using that automatically blocks anything in a subdirectories called, /ads or /adv , for example.

    Is there a simple way to edit my site to change that subdirectory globally in all already existing posts to a new non-blocked subdirectory name? (just changing the directory name, of course, does not work).

    Thanks,

    Edgar

  2. MichaelH
    Member
    Posted 7 years ago #

    If you uploaded those files using the inline upload process then you'd need to change the 'guid' field for each of those images in your wp_posts table.

    And of course if you referred to those images in a post you'd also need to change the references.

  3. dworsky
    Member
    Posted 7 years ago #

    Michael,

    These are post-specific images, uploaded while writing each post.

    I just don't want to go back through a YEAR plus of posts and have to change each one.

    No simplier way?

    Thanks,
    Edgar

  4. MichaelH
    Member
    Posted 7 years ago #

    1. Well you could use phpMyAdmin to change one of those records in wp_post then use the SQL it generates to update all the other posts.

    2. You could Export (backup) you database and use a text editor to make the changes then reimport that particular table.

    Whatever you choose, please do a backup of your database before doing anything.

Topic Closed

This topic has been closed to new replies.

About this Topic