• Resolved gennadg

    (@gennadg)


    Hello Tobias,

    Recently I discovered that some records in one of my tables have disappeared. Trying to understand why it happened I got another question, where does TablePress store its data in WordPress? I was trying to find it in MySQL tables but there is no obvious place where I could find it. Please advice.

    Thanks for a great plugin!
    Gennadii

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Is your data missing on the frontend or on the “Edit” screen as well?

    TablePress stores the table data as a JSON-encoded two-dimensional array in the wp_posts database table, using a WordPress Custom Post Type “tablepress_table”.

    Regards,
    Tobias

    In addition to @tobiasbg, remember the escaped characters!

    I was running Find/Replace to convert all my href’s in TablePress
    From: http, www, absolute
    To: https, non-www, relative

    So it looked something like:
    Find: http:\/\/www.website.com\/
    Replace: \/

    Then I just amended under wp_options the siteurl and home
    From: https://www.website.com
    To: https://website.com

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, that’s imported when dealing with URLs or text that contains charactes like / or ".
    Thanks!

    Regards,
    Tobias

    Hello @tobiasbg,
    I want to update img src url in all tables.
    Could you please help me to find “tablepress_table” ?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    all TablePress tables are stored as JSON encoded two-dimensional arrays in the wp_posts database table, with a post_type value of tablepress_table.

    Regards,
    Tobias

    Thanks. Here is one of links that I am wanting to change
    img src=\”http:\/\/old-domain\/wp-content\/uploads\/2017\/05\/250px-Game_of_Thrones-196×300.jpg
    old-domain to new-domain. Could you help me to deal with this?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, now you just have to use a mySQL query for search/replace, which you can find via Google, e.g. https://stackoverflow.com/questions/11839060/find-and-replace-text-in-the-entire-table-using-a-mysql-query

    Regards,
    Tobias

    I have tried
    # update wp_posts set post_content = replace(post_content, ‘http:\/\/old\/’,’http:\/\/new\/’) but without luck.

    MariaDB [videodb]> show tables;
    +———————–+
    | Tables_in_videodb |
    +———————–+
    | wp_commentmeta |
    | wp_comments |
    | wp_links |
    | wp_mgmlp_folders |
    | wp_options |
    | wp_postmeta |
    | wp_posts |
    | wp_term_relationships |
    | wp_term_taxonomy |
    | wp_termmeta |
    | wp_terms |
    | wp_usermeta |
    | wp_users |
    +———————–+
    13 rows in set (0.00 sec)

    MariaDB [videodb]> update wp_posts set post_content = replace(post_content, ‘http:\/\/olddom\/’,’http:\/\/www.newdom.com\/’);
    Query OK, 0 rows affected (0.45 sec)
    Rows matched: 815 Changed: 0 Warnings: 0

    • This reply was modified 7 years, 4 months ago by adminim.
    • This reply was modified 7 years, 4 months ago by adminim.

    You could also use https://www.ads-software.com/plugins/better-search-replace/ .

    Or HeidiSQL for example, to find/replace.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    that looks good to me, but unfortunately, I can’t really help with such mySQL problems at the moment ?? Sorry.
    Make sure to properly wrap the field names with a ` where necessary.

    Another idea would be to export all tables to a JSON files (in a ZIP archive) and then run a search/replace like that in a text editor that can search/replace in multiple files at once (like Sublime Text). Then, just re-import the modified JSON files into TablePress.

    Regards,
    Tobias

    Thanks for your reply @tobiasbg and @leotm. I will use mix of these advices.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ??

    Best wishes,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Where does TablePress store data in WP?’ is closed to new replies.