Concern about the potential size of /databases/pages.php

Post Reply
Sergelie
Sr. Bludit
Posts: 32
Joined: Sun Feb 14, 2021 3:19 pm
Has thanked: 6 times
Been thanked: 4 times
Contact:

I understood that custom fields content (for all pages) is stored in one single file /databases/pages.php .

Should I be concerned about the size of this file "pages.php" since I have several fields (some of them with fairly long strings (ex.: a dish menu description - about 2 lines)) if I have hundreds of such pages? And how could I manage this properly to limit the risk of errors/slow down of the system?

It sounds a bit risky to me that the content of one page is split over different files, including in the main common file. If the Pages.php gets corrupted from an issue with custom fields, then the whole site is affected. My suggestion would be to have those custom fields content saved in a file (per page) and stored in the folder of the page along with the .txt file.
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

Hi,
the size for pages.php is more for metadata, but in your case, you have a valid point about the custom fields, I can check a better solution for custom fields and store them in separated files as you mentioned, for Bludit v4.

Regarding corrupt data, you can use some plugin for backup or if you have access to the server set some cronjob and do a backup at the file system level.

Regards
Sergelie
Sr. Bludit
Posts: 32
Joined: Sun Feb 14, 2021 3:19 pm
Has thanked: 6 times
Been thanked: 4 times
Contact:

Thanks Diego,

I appreciate a lot. Please let me know (if it is not too much trouble) about the changes you make on this issue, as soon as you are done. I could test it. Yes I do regular backups and I use Time machine.

A plus would be (for me) to be able to save the custom fields content apart from the rest - A separate save button.

The thing is that custom fields are very very practical, it saves a lot of time and it makes it more user friendly for authors to make safe changes on their own files. I am doing menus, and I want my restaurant owners to be able to change their daily specials by just editing a few custom fields. And editing those fields even from a mobile- in full site mode (TinyMCE) is doable.

Regards
Post Reply