Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8088019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:58:10+00:00 2026-06-05T18:58:10+00:00

I recently imported quite a few posts (many thousands) into WordPress and found out

  • 0

I recently imported quite a few posts (many thousands) into WordPress and found out that quite a few of them had images at the start of the post that were commented out
<!--<img src="" />-->.

Unfortunately WordPress for whatever reason is adding this comment to all the content, so the content is there but doesn’t show up. So I figured the easy way to solve this was to run a find and replace SQL statement, to find all instances and replace with nothing.

I haven’t been able to figure out how to get it to work. I’m no expert with SQL, so I was figuring I could use a wildcard in the find statement but apparently not, or at least I can’t figure it out.

So what I want to do is find all occurrences of commented out images and replace them with nothing, basically just delete them. The images aren’t all the same. Some just have a src, some also have height and width, some have alt attributes, etc. And they are not all in the same order. So I was hoping something like UPDATE wp_posts set post_content = replace(post_content, '<!--<img %>-->', '') would work, but it doesn’t.

So if anyone has any ideas on how to do this, I’d be grateful for the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:58:13+00:00Added an answer on June 5, 2026 at 6:58 pm

    Have you had a look at this question. I think your problem is using the ‘%’ without a LIKE does not work. The question recommends using a user defined function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Cocoa project that I recently imported into Xcode 4. I notice
I recently imported about 60k records into a table that relates data in one
I recently back up my local Postgresql database and imported(restored) into Heroku's SHARED_DATABASE. heroku
I have a stack of code snippets imported into Visual Studio. Just recently, they
While recently imported a new project into eclipse, at one point when I tried
I'm trying to clean a recently imported sql server 2008 database that have to
Recently in a project, I had a multiprocessing Process that crashed. A child process
I recently took all my code a manually imported it into an eclipse project
I recently had a problem with an ICS file that I received in email.
I recently imported a large number of source files into an eclipse project. Unfortunately

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.