Support » Plugin: TablePress » Use JSON as table storage

  • Resolved cornelos


    Hi Tobias,

    I would very much like to use a json file as the storage of the table data and not the database. Is this somehow possible?
    I know I can import json but this is not enough.

    The reason is that I want to be able to alter the table data from an external plugin and I think that would be the easiest by changing json files.

    If this possible?
    And if not: are there things I should consider when changing the table data in the database?

    I like yout plugin!

    • This topic was modified 1 month, 3 weeks ago by cornelos.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg



    thanks for your post, and sorry for the trouble.

    TablePress does not support storing table in files at this time. Technically, this is of course possible, but you’d first have to write a replacement PHP class for the models/model-post.php file that handles table saving to files then.

    However, I don’t really think that your use case really needs this. Why would it be easier for your external plugin to modify a file instead of an entry in the mySQL database, specifically in the “wp_posts” database table? That seems strange to me. Also, if it is a WordPress plugin, you could actually even use TablePress PHP functions to save the modified file. That might make it easier to consider everything: For example, when changing the size of the table (add/remove rows/columns), you’d need to adjust the corresponding settings for visible and hidden rows/columns that TablePress also stores (in an entry in the “wp_postmeta” database table).




    Thanks Tobias, I am now creating tables by posting them. Works like a charm!

    Plugin Author TobiasBg



    no problem, you are very welcome! đŸ™‚ Good to hear that this helped!

    Best wishes,

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.