I'm looking for a tool or a script that can dynamically create HTML pages for dynamically created WordPress pages generated by JavaScript + PHP.
But there is a catch.
I can generate HTML pages for some of the WordPress website with a caching plugin or static page generator plugin, but it only generates HTML pages for the main pages of the WordPress site and does not work with our 100s of dynamically generated photo gallery pages and the dynamically generated pages for each photo in the gallery.
We are using the Envira Gallery plugin to generate our photo galleries and the plugin uses JavaScript and PHP to dynamically generate a thumbnail main gallery page and individual pages with unique URLs for each photo. But the individual photo pages are created on the fly and the pages don't exist in the database or in the structure of the site until they are generated dynamically.
Here is an example of one of the photo galleries:
When you click on a thumbnail, a page is created for that image dynamically and the gallery will autoplay and cycle through all of the images creating a unique URL page in at runtime.
How can I store these pages locally using a tool or a plugin or a script of some sort?
Also, while I want a static HTML page I want the JavaScript functionality on the page to be preserved.
Lastly, there are thousands of these image pages so it is not practical to cycle through them manually and save as. I need a tool or some code.
I have tried many tools and looked at other posts online and nothing do what I am asking.
How can I do it?