Support » Plugins » grep for WordPress?

  • Resolved nycvelo


    Greetings. Is there a grep-like command to find text strings in WP posts?

    I am looking to convert table references in WP posts from the old WP-Tables to Tobias’ excellent WP-Tables-Reloaded plugin. The first task is to find all the existing WP-Tables references. I am aware that the WPT and WTR IDs are different but conversion is the easy part; first I need to find the WPT references.

    This is on WP 2.8.3. I am the sysadmin for the system WP runs on.

    Thanks in advance for any clues on text searching.

Viewing 4 replies - 1 through 4 (of 4 total)
  • TobiasBg



    I don’t know of an easy way to do this, but I suggest the following, as you will most probably have to touch each post/page with a table individually, because the ID of the table changed:

    Just use the search on the “Edit” screen of the “Posts” and “Pages” screens of WordPress. If you search for “[TABLE ” you should get only those tables with a wp-Table in them. Then you could edit each of those one by one, replacing the old shortcode with the new one.

    This requires some manual work, but it’s the only way I see for achieving this.

    Best wishes!

    Will Kemp


    You could try google! A search string like: “the text string you’re searching for”

    might do it.

    Will Kemp


    Alternatively, if you feel like descending in the dark realms of mysql, you could try something like the following mysql query:

    select ID from wp_posts where post_content like '%your search string%';

    It’s a bit clunky, but it might work. If it does, it will give you the post IDs. If you’d rather have the post titles, you could do:

    select post_title from wp_posts where post_content like '%your search string%';


    Thanks! These are both great suggestions. I didn’t know content was searchable through the WP dashboard, nor was I aware of the ‘like’ keyword in SQL.

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘grep for WordPress?’ is closed to new replies.