404 crawl errors (Bedrock site)

Hi, our WordPress site is built with the Bedrock system (https://roots.io/bedrock/) which changes the directory structure from the default to one where WordPress core files are under a /wp path, but public content is still served from the root.

It seems that static-html-output and wp2static plugins don’t work with this: I see very large numbers of BAD RESPONSE STATUS (404) messages in the plugin log, and in webserver logs I see the crawler attempting to hit strange URLs. For example, if the detected URL is https://testserver.example/about, the crawler tries to hit https://testserver.example/wpabout.

The root cause appears to be that statichtmloutput and wp2static are using site_url (https://testserver.example/wp in the example above) as the basis for crawling rather than home_url (https://testserver.example/), and also in this situation a subdirectory of /wp is mistakenly identified: the subdirectory detection logic looks like it should also be based on home_url rather than site_url.

1 Like

Yes, I have the same issue here. Had to change the structure back to default wp for wp2static to work correct. Would be nice if the issue could be fixed.