• James Coletta

    (@jamescolettaphotography)


    Hey People,

    I run a photography website ( https://www.JamesColetta.com ) and typically embed my photos inline on the post. I changed my permalink structure and all my photo links are broken. Since I did this after making a couple hundred post, I need an efficient way change (all if possible) the media link to option on multiple photos and a lot of post either all at once or post by post if I have too.

    Theres way too many photos for me to do this photo by photo.

    Is there a fast way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • So if I understand correctly, you did NOT use the built-in Media Uploader to upload and embed your images? I’m guessing not, because had you then WP would automatically correct the permalinks to the photos if you change your permalink structure under Settings>Permalinks.

    So it sounds like you added the HTML with the path to your images directly into each Post, hardcoding the path used in the source (e.g. <img src=”hardpathtoimagefile.jpg” />).

    If that’s the case, what you need is a SQL query to find and change all of those references…..

    BUT the good news is that you can likely get this done using a Plugin like this one:

    https://www.ads-software.com/plugins/find-replace/

    Be aware that this specific plugin hasn’t been updated in a while so no guarantee it will work with newer versions of WP, but if you search you may find another similar, and more recently updated, plugin.

    BE SURE to backup your database first! AND if your database is large, make a few smaller backups of a few tables at a time as a precaution – some site hosting companies will timeout while trying to restore from a large database backup.

    Thread Starter James Coletta

    (@jamescolettaphotography)

    I did use the built in media uploader which is why this is such a set back.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mass Change media Link To on post/multiple post’ is closed to new replies.