Title: Mass change using SQL-queries
Last modified: September 29, 2019

---

# Mass change using SQL-queries

 *  Resolved [smga](https://wordpress.org/support/users/smga/)
 * (@smga)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/)
 * Hello!
    Are there ways to mass change table contents using database queries? 
   We have a site dedicated to Android car devices, now all devices have switched
   to version 9.0 and we need to change all the tables here [http://www.daystar.su/ves-katalog-golovnyih-ustroystv-daystar-dlya-avtomobiley](http://www.daystar.su/ves-katalog-golovnyih-ustroystv-daystar-dlya-avtomobiley)
   For example, to massively change the content of plain text on pages, we use a
   query like this: `UPDATE wp_posts SET post_content = REPLACE(post_content, 'OLDTEXT','
   NEWTEXT');` Is there anything for tables? Thank!

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979232)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * That exact query should actually also affect TablePress tables, as they are stored
   in the `wp_posts` database table as well.
    You might only have to take into account
   special characters like quotation marks, if you have those in the old or new 
   text.
 * After running this, you should see the change on the tables “Edit” screen already.
   On the page where the table is shown, it might take up to 12 hours, until the
   cache is refreshed.
 * Regards,
    Tobias
 *  Thread Starter [smga](https://wordpress.org/support/users/smga/)
 * (@smga)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979268)
 * Could you give an example of this request so that it becomes clear to us where
   to move. Thank in advance!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979480)
 * Hi,
 * I’m not sure that I understand. What do you mean with “request” here? You already
   have the SQL query which you can use in e.g. PHPMyAdmin.
 * Regards,
    Tobias
 *  Thread Starter [smga](https://wordpress.org/support/users/smga/)
 * (@smga)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979494)
 * For example, to change the content of post’s text we use a query like this:
    
   UPDATE **wp_posts** SET **post_content** = REPLACE(**post_content**, ‘OLDTEXT’,‘
   NEWTEXT’); For tables of TablePress, of course, we need another query, meaning
   fields **wp_posts** and **post_content**, what I must to write instead of these
   fields to change TablePress content? Thank in advance!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979524)
 * Hi,
 * no, as I said above, the exact same query will work for TablePress tables! 🙂
 * Regards,
    Tobias
 *  Thread Starter [smga](https://wordpress.org/support/users/smga/)
 * (@smga)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979532)
 * It’s embarrassing for me to bother you, but there are no TablePress data in table
   wp_posts and column post_content of the database…
    Okay, I’ll try to solve this
   issue myself, all the best!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979547)
 * Hi,
 * that would be really strange. TablePress stores its tables as a “Custom Post 
   Type” in the `wp_posts` database table. The table content (a two-dimensional 
   array) is JSON-encoded and then stored in the `post_content` column. The table
   name is the `post_title`. The quickest way to find all tables should be to search
   for `tablepress_table` in the `post_type` column.
 * Regards,
    Tobias

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

The topic ‘Mass change using SQL-queries’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/mass-change-using-sql-queries/#post-11979547)
 * Status: resolved