I wrote a php file that pulls the 5 most recent posts from my wordpress website. I don’t want the users to directly access this file because then it would query the database every time. How do I create a static page that gets updated using the php file, say, everyday and have the users access that?
This has got to be easy but I’m new to all of this and I’m seeking a solution.
Just create a script that generates the static HTML files, and use a cronjob to call it every night. That’s an example.