PhpMyAdmin Query for WordPress

How do I query PhpMyAdmin to delete WordPress comments where the commenter added their website?

That is, comments by people who used a url: Name, Email, Website.

Read More

I want to delete comments that have Website data.

Related posts

Leave a Reply

2 comments

  1. The wp_comments table has the fields comment_author, comment_author_email, comment_author_url, and comment_content, among others.

    Note that before performing any database manipulation you should back up your database, since these commands if used improperly will delete all comments from your blog.

    If you want to remove any comment where the author placed a website in the comment_author_url field (which many do to identify their “home” blog,) you can do this:

    delete from wp_comments where comment_author_url like '%http://%';
    

    If instead you want to remove a comment where the author placed a website in the content of the comment (as is common with comment spam) you can do

    delete from wp_comments where comment_content like '%http://%';
    

    Edit your question to have more specifics about what you want to do if this does not answer your question.