Is there any way to add entry by hand ?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
User avatar
8x5ixa
Posts: 5
Joined: Mon Feb 23, 2026 1:04 pm

Is there any way to add entry by hand ?

Post by 8x5ixa » Mon Feb 23, 2026 1:37 pm

I recently started to learn about FlatPress and was impressed by how good and at the same time simple a CMS can be! But there’s one thing I’m worried about that I’d like to know, and I think I need help from more technically literate people..Because to be honest, I’m not very good at web development

As far as I can tell, FP stores blog entries in : /fpblogpath/fp-content/content/year/month/entrydate.txt

What i want to do : I want to automate the process of adding entries a bit..Adding, let's say, 2,000 similar entries by clicking each in the admin panel is a pretty hard to achieve, I’m trying to find a way to make it easier, since my blog is located on localhost, i have direct filesystem access.

What i tried : copied the file /fpblogpath/fp-content/content/year/month/entrydate.txt (to, just an example) /fpblogpath/fp-content/content/anotheryear/anothermonth/anotherentrydate.txt and slightly edited the file, but I quickly realized that updating the blog page, a entry copied in this way does not appear.

After that I realized that FP also stores information about which entries are registered within the blog, through files : /fpblogpath/fp-content/index/index-*.dat

But... As I understand it, these are binary dat files that can only be edited by a HEX editor. Is there an easier way to achieve the desired goal? Without having to delve into web development. Can you guys please help me understand how the things working ?

User avatar
fraenkiman
FlatPress Coder
Posts: 492
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Is there any way to add entry by hand ?

Post by fraenkiman » Mon Feb 23, 2026 9:18 pm

Hello 8x5ixa,

Welcome to the FlatPress forum. I assume you want to enable import from another CMS? You may have done everything correctly so far. If your entry file entryYYMMDD-HHMMSS.txt is structured as shown here.

The file and directory structure must be as follows:
Screenshot 2026-02-23 221117.png
Screenshot 2026-02-23 221117.png (22.15 KiB) Viewed 481 times
If the created file is in the correct directory but is not displayed in the frontend, simply go to Admin Area -> Maintenance and “rebuild the index.”

Best regards,
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io, synced with :elephant: Mastodon

User avatar
8x5ixa
Posts: 5
Joined: Mon Feb 23, 2026 1:04 pm

Re: Is there any way to add entry by hand ?

Post by 8x5ixa » Tue Feb 24, 2026 11:06 am

fraenkiman wrote: Mon Feb 23, 2026 9:18 pm simply go to Admin Area -> Maintenance and “rebuild the index.”
Thank you so much for your help, Fraenkiman! It was really about pressing the button "rebuild the index", now "copied by hand" posts on the blog are showing in the list on the website, but for some reason I’m getting some strange behaviour. If I click on "copied by hand" posts to try to open it, I get an error message "Not Found, Sorry, we could not find the page you requested"

The exact actions I performed:

1. Created test entry using admin panel, with subject "test-subj" description "test-1" and clicked Publish, and got the record "fp-content/content/26/02/entry260224-154328.txt"

2. Opened Terminal Emulator in my XFCE Linux Desktop (and the same time server with Caddy for FlatPress version 1.4) (xfce4-terminal), went to the directory "fp-content/content/26/" using cd

3. Copied directory "fp-content/content/26/02" to "fp-content/content/26/01" using sudo cp -pr to preserve filesystem privileges

4. Renamed file "fp-content/content/26/01/entry260224-154328.txt" to "fp-content/content/26/01/entry260124-160800.txt" using sudo mv

5. Opened the file "fp-content/content/26/01/entry260124-160800.txt" for editing with sudo nano and :

changed line "test-subj" to line "test-subj2"
changed line "test-1" to line "test-2"

6. Converted test date from "string" to Unix "epoch" using command date -d "2026-01-24 16:08:00 UTC" +%s and got 1769270880, replaced date line in opened file from "|DATE|1771947808|" to "|DATE|1769270880|"

7. Saved changes

8. pushed the button "rebuild the index" and returned to my FP blog’s posts page

9. now I see the post with subject "test-subj2", but when I click on the title to see the entire post, an error occurs "Not Found, Sorry, we could not find the page you requested"

Please tell me what I am doing wrong in this test

Best regards and respect

p.s small addition : for some reason problem appears if i am using custom theme "Rainbow" from https://wiki.flatpress.org/res:themes
For some reason, if I use the standard Leggero theme, the problem will disappear on its own

User avatar
8x5ixa
Posts: 5
Joined: Mon Feb 23, 2026 1:04 pm

Re: Is there any way to add entry by hand ?

Post by 8x5ixa » Tue Feb 24, 2026 11:40 am

changed the theme back to RainBow and now everything works :shock:

It seems that the issue is not really related to the theme of the blog design, something seems to have happened when changing the theme next and back, or I don’t understand something :shock:

I’ll try to do the test again

I double-checked, yes, it’s NOT about the specific theme, but somehow it’s about the fact that in order for manually copied "by hand" posts to be opened on the website, you have to change the theme of the blog layout to any other and then back to the previous one, and everything starts magically working, seems so.

took another test, this time I selected default Leggero, copied the post manually "by hand", updated website page, when clicking on the post on the website got an error, changed the theme of the design from Leggero to any other, then immediately back to Leggero, now the post on the site opens..I think I found a bug

User avatar
8x5ixa
Posts: 5
Joined: Mon Feb 23, 2026 1:04 pm

Re: Is there any way to add entry by hand ?

Post by 8x5ixa » Tue Feb 24, 2026 12:15 pm

copied the post manually "by hand", pushed the button "rebuild the index"***, updated website page, etc etc

forgot to mention "rebuild the index" button press, but it doesn’t change the point

User avatar
fraenkiman
FlatPress Coder
Posts: 492
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Is there any way to add entry by hand ?

Post by fraenkiman » Tue Feb 24, 2026 10:18 pm

Hello 8x5ixa,
8x5ixa wrote: Tue Feb 24, 2026 11:40 am changed the theme back to RainBow and now everything works :shock:

It seems that the issue is not really related to the theme of the blog design, something seems to have happened when changing the theme next and back, or I don’t understand something :shock:
1. When changing the theme/style, FlatPress automatically clears the Smarty template cache. You can also find this function in the “Maintenance” section of the admin area. This should help with “Not Found” errors.

2. The path and file name must match exactly. FlatPress expects entries under fp-content/content/<yy>/<mm>/entry<yymmdd>-<hhmmss>.txt. If the file name and folder do not match, FlatPress will not be able to find the entry reliably.

Best regards,
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io, synced with :elephant: Mastodon

User avatar
8x5ixa
Posts: 5
Joined: Mon Feb 23, 2026 1:04 pm

Re: Is there any way to add entry by hand ?

Post by 8x5ixa » Thu Feb 26, 2026 8:54 am

fraenkiman wrote: Tue Feb 24, 2026 10:18 pm 1. When changing the theme/style, FlatPress automatically clears the Smarty template cache. You can also find this function in the “Maintenance” section of the admin area. This should help with “Not Found” errors.
Yes, it seems that everything works now, it seems to add entries manually via the file system, you have to press two buttons in admin panel, "Rebuild index" and "Purge theme and templates cache", then everything works as it should

I really appreciate your help! Thank you so much! I think that one day when I have enough money not to worry about living needs, I will donate to FlatPress
fraenkiman wrote: Mon Feb 23, 2026 9:18 pm Welcome to the FlatPress forum. I assume you want to enable import from another CMS?
No no, it’s just my home lab project :D

I don’t know much about web programming, but I do know how to develop graphical applications for the PC. I just wanted to make an automatic system for publishing on FP for my home lab project, that would track changes in the file directory and automatically create new entries with information on the site.

Thanks to your assistance, I now believe it is achievable! ;) Have a good day and stay healthy

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests