Support » Plugin: WP2Static » 404 handling for exported site

  • Resolved kylecagb


    I’m looking for a way to get WP2Static exported websites to include their WordPress theme 404 page to use on the static site. How are people choosing to handle this? It seems that by default the WP2Static export doesn’t offer any way to handle 404s. I think that’s what this guy was talking about as well:

    Right now I’m just including a static 404 file at /404/index.html and adding an error handling line to the apache server I’m using as a static host:
    ErrorDocument 404 /404/

    While this sort of works, I’d much prefer to have the WP themed 404 page accessible, even if I still need to set the apache errordocument line manually

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mark


    Hi there kylecagb (@kylecagb),

    Thank you for sending us a message.
    Our team is working on giving solutions to all errors and bugs emerging. I will leave this ticket open and wait for a response from anyone of us to give you instructions to solve this concern.
    Thanks for understanding.

    Plugin Author WP2Static Team


    Hi @kylecagb this will depend on where you’re hosting your static sites.

    You mentioned .htaccess, so Apache regular hosting somewhere.

    In this case, yeah, generating a single page from WordPress (not using any 404 plugin or 404-template), the manually redirecting any 404’s in your .htacess to this page’s URL should suffice.

    Other platforms, like Netlify, S3/CloudFront will require slightly different implementation.

    We have plans to streamline the 404 page handling during deployment / per-deployment Add-on, but this is still a ways out.



    Alright, this idea crossed my mind but I wanted to see if there was a more direct solution. I have no problem setting up the htaccess or netlify _redirects files myself, if there was an option to render the existing 404 page template page into a 404.html file (or 404/index.html file) that would work just fine for me

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.