elementor / wp2static

WordPress static site generator for security, performance and cost benefits
https://wp2static.com
The Unlicense
1.42k stars 266 forks source link

can't detect inactive domains (locally) using (wp wp2static detect) , using command-line #865

Open shyambaseapp opened 2 years ago

shyambaseapp commented 2 years ago

I want to crawl the WordPress site which is installed on my computer (locally). But the detected path goes for online crawling( wp wp2static crawl).

[demomaster@23.239.25.114]: [2022-04-06T07:27:15+00:00] Starting to detect WordPress site URLs. [demomaster@23.239.25.114]: PHP Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: appledssdg.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://appledssdg.com/robots.txt in /var/www/appledssdg.com/htdocs/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php:210

shyambaseapp commented 2 years ago

If the domain is active then it works and if I add the domains in our /etc/hosts file then it also works(which is not active).

shyambaseapp commented 2 years ago

I think wp2static crawl the path online like:

[2022-04-08T05:31:22+00:00] Starting crawling [2022-04-08T05:31:22+00:00] Starting to crawl detected URLs. [2022-04-08T05:31:22+00:00] Using CrawlCache. Array ( [0] => Array ( [url] => http://abc123.com/ [path] => / ) [1] => Array ( [url] => http://abc123.com/favicon.ico [path] => /favicon.ico ) [2] => Array ( [url] => http://abc123.com/page/1/ [path] => /page/1/ ) [3] => Array ( [url] => http://abc123.com/robots.txt [path] => /robots.txt ) [4] => Array ( [url] => http://abc123.com/sitemap.xml [path] => /sitemap.xml ) [5] => Array ( [url] => http://abc123.com/wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Italic.otf.woff2 [path] => /wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Italic.otf.woff2 ) [6] => Array ( [url] => http://abc123.com/wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Italic.ttf.woff2 [path] => /wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Italic.ttf.woff2 ) [7] => Array ( [url] => http://abc123.com/wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Roman.otf.woff2 [path] => /wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Roman.otf.woff2 ) [8] => Array ( [url] => http://abc123.com/wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Roman.ttf.woff2 [path] => /wp-content/themes/twentytwentytwo/assets/fonts/SourceSerif4Variable-Roman.ttf.woff2 ) [9] => Array ( [url] => http://abc123.com/wp-content/themes/twentytwentytwo/assets/images/bird-on-black.jpg [path] => /wp-content/themes/twentytwentytwo/assets/images/bird-on-black.jpg )

shyambaseapp commented 2 years ago

I want to crawl the site locally using given URLs, not forgo online.