Static WordPress Community

Couldn't make directory while crawling

Hi! I’m playing with the plugin to actually have something like this https://staticword.press/t/creating-a-lifeboat-site

But during the crawling stage I get some errors, like:

2021-06-03 13:47:18 Couldn\t make directory: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-testing/page/1
2021-06-03 13:47:17 Couldn\t make directory: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-marketing/page/9
2021-06-03 13:47:17 Couldn\t make directory: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-marketing/page/8
2021-06-03 13:47:16 Couldn\t make directory: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-marketing/page/7
2021-06-03 13:47:16 Couldn\t make directory: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-marketing/page/6
2021-06-03 13:47:15 Couldn\t make directory: /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-marketing/page/5

But wp2static-crawled-site directory has 775 permissions and other files are created there. Why it might happen? Is it an issue?

The page, e.g. https://mailtrap.io/blog/category/email-marketing/page/5 exists

I have enabled WP-Rocket with CDN options and Wordfence and a bunch of other plugins. Could that be an issue?

Thanks!

Hi @yanch,

Cool use case for WP2Static - sure it will be able to get working somehow :slight_smile:

Are any files being saved to that uploads wp2static directory during crawling? If not, might be permissions/ownership issue or such. Cloudways is quite popular and I believe other users are on them. Can you post out the relevant sections of WP2Static’s crawl and any other logs here (just make sure nothing sensitive in them)?

The challenge with such a lifeboat site setup, is that you’re trying to run WP2Static from a live site, which has some drawbacks, such as:

  • security plugins may throw false positive, as it crawls your site very quickly, doesn’t look human
  • crawling is intensive, so could be slowing down your site for other users during the process (else, have to crawl slower, making the process more tedious)
  • you have all the other security and performance plugins needed for a live site, which slow down the crawling process

Anyway, that’s just my word of warning, let’s get the crawl working for you by checking out your logs! If you’ve got any other web server/php logs with more info around the time of crawling, that may help, too.

Lol, very sorry! I just re-read your bit about other files being there!

Let’s see what the logs say!

Thanks Leon!
So here are wp2static logs wp2static logs - Google Sheets

Also apache error with the same directory says:
apps.com/bchrgjmnrj/public_html/wp-content/plugins/wp2static/src/StaticSite.php on line 33PHP message: PHP Warning: file_put_contents(/mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/uploads/wp2static-crawled-site/blog/category/email-marketing/page/5/index.html): failed to open stream: No such file or directory in /mnt/data/home/576154.cloudwaysapps.com/bchrgjmnrj/public_html/wp-content/plugins/wp2static/src/StaticSite.php on line 33PHP message: PHP Warning: file_put_c

More logs here: https://drive.google.com/file/d/19VcHFuq2QR_0NJ9RYcBsEu4bWzRtOLOr/view?usp=sharing

Does it help somehow?

Thanks for the notices you gave me. I know it’s not the best and it’s better to run wp2static on isolated not loaded with secure plugins WordPress, but I’m just trying how it will work and mb we’ll switch completely to a static website, but it requires some twists in terms of PHP related things on the website.

Also, one more question. I use WP-rocket with CDN turned on.
So I see that in index.html I have links for assets (JS,CSS,images) to CDN but also see that e.g. all those images are also included in a ZIP (wp-content/uploads) I’m getting. Is it expected behavior?

BTW, I used build from May27 as the official one gave me a creation table error.