Turning WP blogs into HTML

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
User avatar
gotonudecom
Verified Member
Verified Member
Posts: 3168
Joined: February 6th, 2018, 1:54 pm
Title: DomainMaster
Referrals: 30
Contact:

#31

Post by gotonudecom » September 24th, 2026, 4:18 pm

tacnet wrote: ↑
September 23rd, 2026, 7:22 pm
gotonudecom wrote: ↑
September 23rd, 2026, 11:57 am
tacnet wrote: ↑
September 21st, 2026, 12:47 pm


I thought there might be a plugin to do this but Im surprised you cant update it ?. An html file is no different to any other file and can be updated as often as you like

Still, the solution above will work with WP and pretty much any other CMS script r6d10k
@tacnet
Have you experience or heard of exporting the WP database into json files and using python to create the static pages of the site?
That's one way of doing it but it seems a bit over complicated. That little script I posted above will take whatever output WP produces and write it straight to an html file. No export or json files needed
I agree, will check that little script out.

Dorman
Verified Member
Verified Member
Posts: 203
Joined: December 30th, 2020, 1:44 am

#32

Post by Dorman » September 26th, 2026, 1:44 pm

tacnet wrote: ↑
August 17th, 2026, 11:27 am
nudelinks wrote: ↑
August 17th, 2026, 5:32 am
How does that work when you want to add a new post?
You can just carry on using WP as normal. Make your posts and the cron job will automatically update the html pages every minute (or however often you set it to run)

Below is a copy of a post I did in the other thread regarding bots. It relates to pages on this forum but it can be tweaked to whatever pages you need

ok this is quick and dirty. Cron job will look something like this :-

Code: Select all

<?php 
//   First write the index to index.html
$html = file_get_contents('https://www.sponsorchat.com/index.php');
$filename = 'index.html';
$handle = fopen($filename,"w");
fwrite($handle,$html);
fclose($handle);

//   Now write topic list to topics.html
$html = file_get_contents('https://www.sponsorchat.com/viewforum.php?f=74');
$filename = 'topics.html';
$handle = fopen($filename,"w");
fwrite($handle,$html);
fclose($handle);
?>
Then, if your not familiar with editing your crontab file then I would get your hosts to add this line to it

Code: Select all

* * * * * php /full/path/to/your/php/file/mycronfile.php
That will run your cron file once every minute. The * * * * * means run the cron every minute. Or I could use */10 * * * * to run it every 10 minutes

Hope that helps
Nice idea let me test this out see if I can see how it does and get back to you 34ddww




User avatar
gotonudecom
Verified Member
Verified Member
Posts: 3168
Joined: February 6th, 2018, 1:54 pm
Title: DomainMaster
Referrals: 30
Contact:

#33

Post by gotonudecom » September 27th, 2026, 12:47 pm

Dorman wrote: ↑
September 26th, 2026, 1:44 pm
tacnet wrote: ↑
August 17th, 2026, 11:27 am
nudelinks wrote: ↑
August 17th, 2026, 5:32 am
How does that work when you want to add a new post?
You can just carry on using WP as normal. Make your posts and the cron job will automatically update the html pages every minute (or however often you set it to run)

Below is a copy of a post I did in the other thread regarding bots. It relates to pages on this forum but it can be tweaked to whatever pages you need

ok this is quick and dirty. Cron job will look something like this :-

Code: Select all

<?php 
//   First write the index to index.html
$html = file_get_contents('https://www.sponsorchat.com/index.php');
$filename = 'index.html';
$handle = fopen($filename,"w");
fwrite($handle,$html);
fclose($handle);

//   Now write topic list to topics.html
$html = file_get_contents('https://www.sponsorchat.com/viewforum.php?f=74');
$filename = 'topics.html';
$handle = fopen($filename,"w");
fwrite($handle,$html);
fclose($handle);
?>
Then, if your not familiar with editing your crontab file then I would get your hosts to add this line to it

Code: Select all

* * * * * php /full/path/to/your/php/file/mycronfile.php
That will run your cron file once every minute. The * * * * * means run the cron every minute. Or I could use */10 * * * * to run it every 10 minutes

Hope that helps
Nice idea let me test this out see if I can see how it does and get back to you 34ddww
let us know how that turns out.

porntraveller
Verified Member
Verified Member
Posts: 609
Joined: May 26th, 2019, 2:01 am

#34

Post by porntraveller » September 29th, 2026, 10:19 pm

Not to get bashed I see no reason to mess about with WP it works and gets updates all the time for free.




Turning WP blogs into HTML

Post Reply