Title: Search and replace
Last modified: August 21, 2016

---

# Search and replace

 *  Resolved [Jenxi Seow](https://wordpress.org/support/users/jenxi/)
 * (@jenxi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-5/)
 * Is there a way to perform a search and replace for a particular term across the
   tables? I want to convert some of the text into links and it is not practical
   to edit the tables one by one.
 * [http://wordpress.org/plugins/tablepress/](http://wordpress.org/plugins/tablepress/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4447881)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * No, sorry, there’s no such option directly in TablePress. My suggestion here 
   is to use a plugin that can search/replace directly in the database. There, all
   tables are stored as the Custom Post Type “tablepress_table” in the “wp_posts”
   table. Thus, you should limit the search/replace to those mySQL table rows.
    
   Then, as you would be working directly on the database, don’t forget to create
   a backup first!
 * Regards,
    Tobias
 *  Thread Starter [Jenxi Seow](https://wordpress.org/support/users/jenxi/)
 * (@jenxi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4447928)
 * Hi Tobias,
 * Thanks for the quick reply. You just confirmed my fears. I guess I’ll just have
   to bite the bullet and give it a go.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4447929)
 * Hi,
 * no worries, it’s not that hard 🙂 Just be sure to have a backup so that you have
   a way to restore the data, if something goes wrong.
 * In fact, you could also try a different way: You could export all your tables
   to CSV files and then use a “Search/Replace” over all of those files, which most
   text editor programs make possible. Then, just re-import the tables into TablePress.
 * Regards,
    Tobias
 *  Thread Starter [Jenxi Seow](https://wordpress.org/support/users/jenxi/)
 * (@jenxi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448019)
 * Hi Tobias,
 * I don’t think exporting to CSV works because some table contents content HTML.
   That’s why I have been importing using HTML instead of CSV. Unless there is a
   way around this that I’m not aware of.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448020)
 * Hi,
 * don’t worry, exporting to CSV here will work fine, as the HTML code will simply
   be treated as text and it will be kept.
 * Regards,
    Tobias
 *  Thread Starter [Jenxi Seow](https://wordpress.org/support/users/jenxi/)
 * (@jenxi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448021)
 * Hi Tobias,
 * Would I be able to re-import via CSV with the HTML?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448022)
 * Hi,
 * yes, of course. After the re-import, the HTML will be treated as HTML again.
 * Regards,
    Tobias
 *  Thread Starter [Jenxi Seow](https://wordpress.org/support/users/jenxi/)
 * (@jenxi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448023)
 * Hi Tobias,
 * Thank you so much! It works now! I previously tried to import CSV with HTML but
   it threw an error, hence the confusion regarding how to import/export CSV with
   HTML. Now I know I need to had quotation marks to escape the HTML.
 * Yes, this is definitely going to be very helpful going forward. It is a much 
   safer way to do this without having to muck around with the database. And I can
   do a simple search and replace across all the CSV files.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448024)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Yes, quotation marks are the only problematic thing here, as they are used for
   wrapping the cell content. Therefore, all quotation marks in the HTML needs to
   be escaped with a second quotation mark. During the export, this happens automatically.
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  Thread Starter [Jenxi Seow](https://wordpress.org/support/users/jenxi/)
 * (@jenxi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448025)
 * Hi Tobias,
 * Yes, I hope this will be useful to others who are trying to do the same thing
   as me. Being able to use CSV makes it a lot easier to create the tables. And 
   preserving HTML makes it easier to style and present the data.
 * It might be useful to add the bit about CSV importing to the FAQ or documentation.
   I looked around for help on that but gave up when nothing turned up. Or perhaps
   I missed it completely.
 * Another point to add it that quotation marks need to be escaped too.
 * So if people who want to output:
    `<a href=“http://url/“>` will have to use `"
   <a href=""http://url/"">”`
 * I hope this helps others who come across this post.
 * Thanks once again, Tobias. I will definitely rate the plugin because this is 
   the best table plugin for WordPress. =)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448026)
 * Hi,
 * yes, that’s what I meant above 🙂 Quotation marks have to be escaped with a second
   one, as that seems to be the most common handling of the escaping issue in CSV(
   see e.g. [http://en.wikipedia.org/wiki/Comma-separated_values](http://en.wikipedia.org/wiki/Comma-separated_values))
 * And thanks for the rating, I really appreciate it!
 * Best wishes,
    Tobias
 *  [yellowlover](https://wordpress.org/support/users/yellowlover/)
 * (@yellowlover)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448068)
 * What plugin do you recommend that does a search and replace directly in the database?
   I need to replace about 500 fields in Tablepress. I usually use Velvet Blues 
   to update URLs on a site, but that doesn’t seem to work for Tablepress.
 * Thank you,
    Laura
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448069)
 * Hi Laura,
 * I’m not really familiar with such plugins, unfortunately, as I usually just do
   it directly with a SQL in the database (using a tool like phpMyAdmin on the server).
   Thus, I can’t really recommend one, sorry 🙁
 * Regards,
    Tobias

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Search and replace’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/search-and-replace-5/#post-4448069)
 * Status: resolved