• Resolved komaldhobe

    (@komaldhobe)


    So I am using the Search Regex plugin to replace images or texts in my blog. I was able to replace images inside the blog post. However, I could not search for the featured/eyecapture images. How do I search for and replace featured images?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @komaldhobe

    I suggest posting your question in the official Search Regex support forum: https://www.ads-software.com/support/plugin/search-regex/

    They also have this support blog if you haven’t seen it: https://searchregex.com/blog/

    Hi @komaldhobe

    The featured images are saved in the wp_postmeta tables, so you should be selecting “Post Meta” as the source for the Search Regex plugin if you are looking to replace the featured image.

    If the above still doesn’t help then checking with the plugin support would be ideal as suggested:
    https://www.ads-software.com/support/plugin/search-regex/#new-topic-0

    Regards,

    Nithin

    Thread Starter komaldhobe

    (@komaldhobe)

    thank you all for the quick reply.

    @wpmudevsupport11 thank a lot for the answer, I tried it but couldn’t figure it out, so I have posted the question in plugin’s dedicated support group.

    Moderator bcworkz

    (@bcworkz)

    FYI, featured images are saved in the postmeta table by their parent post’s ID, as the image attachment’s ID with the meta_key “_thumbnail_id”. Typical table record:

    meta_id   post_id   meta_key          meta_value
    123       456       _thumbnail_id     789
    Thread Starter komaldhobe

    (@komaldhobe)

    @bcworkz thanks for your FYI answer, but I do not understand code so this is not helping me. I only want to know the plugin settings that would help me achieve this!

    Hi @komaldhobe,

    . I only want to know the plugin settings that would help me achieve this!

    Did you try searching based on the image path? ie in the following format:

    2024/12/one.jpg
    2023/11/two.jpg

    Maybe that might help? The above path is an example, you’ll have to update the path according to your image URL for both Search & Replace field in the above format.

    Please do make sure you have a backup before running any such actions.

    Kind Regards,

    Nithin

    Thread Starter komaldhobe

    (@komaldhobe)

    @wpmudevsupport11 Yes, I did that. That is how I replaced the images in the blog post. However, even though the path for the featured images is the same, they do not appear in the search results. So I am kind of lost here!

    Hi @komaldhobe,

    The mentioned workflow in my previous reply does work on my test site. Did you select “Post Meta” from the Source field?

    ie:

    View post on imgur.com

    If the above is how you are tried and still it does’t work then most probably the path structure is different, you can access the database and check the wp_postmeta tables and check meta_values for _wp_attached_file key.

    The path which needs to be replaced should be similar to the meta_values, maybe you could check it.

    You can also consider using other search & replace plugins if the plugin support isn’t able to help much.

    https://www.ads-software.com/plugins/tags/search-replace/

    Regards,

    Nithin

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.