Static WordPress Community

Error Message During Run

I am just an end user with only very limited PHP savvy. Multiple attempts to run the plugin resulted in the following error message:

Fatal error: Uncaught Error: Class ‘WP2Static\Controller’ not found in /home4/wygentco/public_html/centraltonothing/wp-content/plugins/wp2static/wp2static.php:24 Stack trace: #0 /home4/wygentco/public_html/centraltonothing/wp-admin/includes/plugin.php(2297): include() #1 /home4/wygentco/public_html/centraltonothing/wp-admin/plugins.php(191): plugin_sandbox_scrape(‘wp2static/wp2st…’) #2 {main} thrown in /home4/wygentco/public_html/centraltonothing/wp-content/plugins/wp2static/wp2static.php on line 24

I am not a coder, aside from HTML, but I assume the crux of this problem stems from the ‘WP2Static\Controller’ alert. Is there someone here who might be able to guide me in the right direction toward a workaround or a fix? Any guidance at all would be appreciated. Many thanks.

Hi @Reedmaven,

Sorry for the painful introduction to the plugin. Please see this response:

https://staticword.press/t/wp2static-on-github-error/225

And if you want to start with an easier plugin that does similar, you may want to try Static HTML Output, which does have a ready to run installer at https://github.com/WP2Static/static-html-output-plugin/files/4822705/static-html-output-plugin-6.6.21.zip

Things will get easier soon, but bit of pain a while longer, sorry!

1 Like

No need for apologies
you guys do fantastic work

i’m still dipping toes and learning to the best of my abilities!

Hello @leonstafford,

Many thanks for the quick reply, and for your continued work on this plugin; and to echo wholeheartedly @jellybean 's sentiments, apologies are gracious but unnecessary. The link to #225 post that you supplied returned an “Oops! That page doesn’t exist or is private.” Thanks also for your suggestion regarding implementation of Static HTML Output, which I had attempted to use previously, but upon repeated tries, resulted in an output that included only images (?!) and virtually nothing else. I have also sampled a few website rippers, but they also failed to produce usable HTML files. Bad juju at centraltonothing.com? Doubt it, but perhaps laborious copy and pasting of page source output may be my port of last hope. Not an appealing prospect, but if time and persistence are mine only enemies, success may be within my anxious grasp. Many thanks again for your guidance.

Re Static HTML Output - are you by chance running Windows for your webserver that does the export? That could explain the images only result and I’ve got an unreleased fix for that I can send to try.

Oops! I was trying to share a link to a DM here, not a public thread! Here’s the best bits copied from that:

for this one (as I haven’t published any releases for easy installation yet), you’ll need to run the following command to build the plugin:

composer install

where do i run composer install?!

So, you can either install Composer on same server as your WordPress dev site or you can install it on your local machine if that’s different and then run 2 commands, in order to generate a ready-to-install zip of the plugin:

  • composer install
  • composer build wp2static

That should stick a wp2static.zip into your ~/Downloads directory

1 Like

@Reedmaven

There’s a little invalid HTML in there, which you may as well try and tidy up, regardless of if it’s causing any issues with Static HTML Output (which does parse and regenerate HTML, WP2Static only replaces strings within the output, so will preserve any invalid HTML).

Is that your own site? I love it! Always great to see unique, personal writing and creativity! ie https://www.centraltonothing.com/what-it-means/

I’ve subscribed to your current RSS feed, but we may need to check that upon any successful export of the static site to see if it’s still working properly (I can’t recall state of RSS/XML exports in each plugin).

Holy smokes! I was aware that my existence in this material world afforded many cautionary tales, but the sheer volume of HTML errors which you revealed are generated by my website, boggles what remains of my still-functioning grey matter. And somehow, despite this, you still managed to render a compliment. Who says that what awaits us is an anthropogenic apocalypse, when such generous humans still roam about us, unheralded and (largely) unknown? I will attempt to implement your Composer installation advice, and watch anxiously what transpires. And congratulations, by the way, as you have the unique distinction of being among the dozen or so web-wanderers who have stumbled upon my ravings. I am gratified that you survived the encounter.

2 Likes