Unable to create static from site not in /
-
After setting a test blog and try using WP2Static, crawlder creates URLs as per /file_path/file_name.extension instead of /site_path/file_path/file_name.extension.
For that reason it’s not creating any file, no matter if I use subfolder / ZIP export
-
Hi @jbrinxs,
Could you please enable Debug Mode (Advanced tab), re-run export, then send me the Export Log (Logs tab).
That may give me some clues as to where it’s failing…
Cheers,
Leon
This is the first lines from the log (where the errors are located)
Crawling /
BAD RESPONSE STATUS (401): /
Memory allocated by crawl script: 2048
Exclusion rules wp-json
Crawling /2019/03/hello-world/
BAD RESPONSE STATUS (401): /2019/03/hello-world/
Memory allocated by crawl script: 2048
Exclusion rules wp-json
Crawling /2019/03/some-other-post/
BAD RESPONSE STATUS (401): /2019/03/some-other-post/
Memory allocated by crawl script: 2048
Exclusion rules wp-jsonThen, some lines after it gets the “correct” path, but with same error response
Crawling /path_to_site/2019/03/
BAD RESPONSE STATUS (401): /path_to_site/2019/03/
Memory allocated by crawl script: 2048
Exclusion rules wp-json
Crawling /path_to_site/2019/03/hello-world/
BAD RESPONSE STATUS (401): /path_to_site/2019/03/hello-world/
Memory allocated by crawl script: 2048
Exclusion rules wp-json
Crawling /path_to_site/2019/03/some-other-post/
BAD RESPONSE STATUS (401): /path_to_site/2019/03/some-other-post/
Memory allocated by crawl script: 2048
Exclusion rules wp-jsonHope this helps, if you need any specific section please let me know
I think that the problem comes from that part:
WP URL https://FQDN/path_to_site
WP SITEURL https://FQDN/path_to_site
WP HOME https://FQDN/path_to_site
WP ADDRESS https://FQDN/path_to_site
PLUGIN VERSION 6.6.5
VIA WP-CLI?
STATIC EXPORT URL https://FQDN/So, seems that static export is not taking correct value from WP URL.
Thanks @jbrinxs
It may help me to get the full log, if you can email to leon@wp2static.com
The errors are 401’s/authentication related. Do you have any http basic authentication credentials that need to be added to the Crawl tab’s settings?
The crawl paths look OK, but I may be missing something.
A fairly quick test may be to clone the site to a local one on Local by FlyWheel or any of the options I list here: https://wp2static.com/preparing-to-go-static-with-wordpress/
And set it up at the domain root, no subdirectory, to eliminate the paths being the problem…
Cheers,
Leon
Hi Leon,
I’ve made some changes but still having same issues.
– I’ve moved to /
– Changed URLs, etcExporting always to ZIP
If I execute without authentication (removing it also from apache conf)
I receive the following error message in WP as well as this message in apache error log
Failed during "Crawling initial file list", please consult the Help tab for where to get assistance.
==> /var/log/apache2/ssl_error.log <== [Tue Apr 02 18:35:22.291747 2019] [:error] [pid 926] [client 192.168.0.228:52537] PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/HTMLProcessor.php:2\nStack trace:\n#0 /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SiteCrawler.php(2): HTMLProcessor->processHTML('<!DOCTYPE html>...', 'https://FQDN...')\n#1 /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SiteCrawler.php(2): SiteCrawler->loadFileForProcessing()\n#2 /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SiteCrawler.php(2): SiteCrawler->crawlABitMore()\n#3 /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SiteCrawler.php(2): SiteCrawler->crawl_site()\n#4 /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SiteCrawler.php(2): SiteCrawler->__construct()\n#5 /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/Dispatcher.php(2): require_once('/var/www/html_s...')\n#6 /var/www/html_ssl in /var/www/html_ssl/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/HTMLProcessor.php on line 2, referer: https://FQDN/wp-admin/admin.php?page=wp2static
this is the log
2019-04-02 05:38:21 PHP VERSION 7.0.33-0+deb9u3 OS VERSION Linux hostname 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l WP VERSION 5.1.1 WP URL https://FQDN WP SITEURL https://FQDN WP HOME https://FQDN WP ADDRESS https://FQDN PLUGIN VERSION 6.6.5 VIA WP-CLI? STATIC EXPORT URL http://OFFLINEZIP.wpsho PERMALINK STRUCTURE /%year%/%monthnum%/%postname%/ SERVER SOFTWARE Apache/2.4.25 (Raspbian) Active plugins: classic-editor/classic-editor.php cookie-law-info/cookie-law-info.php smart-slider-3/smart-slider-3.php static-html-output-plugin/wp2static.php Plugin options: additionalUrls: allowOfflineUsage: 1 baseHREF: baseUrl: baseUrl-bitbucket: baseUrl-bunnycdn: baseUrl-folder: https://FQDN/ baseUrl-ftp: baseUrl-github: baseUrl-gitlab: baseUrl-netlify: baseUrl-s3: baseUrl-zip: baseUrl-zip: basicAuthPassword: ******************* basicAuthUser: username bbBranch: bbPath: bbRepo: bbToken: ******************* bunnycdnStorageZoneAccessKey: ******************* bunnycdnPullZoneAccessKey: ******************* bunnycdnPullZoneID: bunnycdnStorageZoneName: bunnycdnRemotePath: cfDistributionId: completionEmail: crawl_delay: 0 crawl_increment: 1 crawlPort: debug_mode: 1 detection_level: everything delayBetweenAPICalls: 0 deployBatchSize: 1 excludeURLs: ftpPassword: ******************* ftpRemotePath: ftpServer: ftpPort: ftpTLS: ftpUsername: ghBranch: ghCommitMessage: ghPath: ghRepo: ghToken: ******************* glBranch: glPath: glProject: glToken: ******************* netlifyHeaders: netlifyPersonalAccessToken: ******************* netlifyRedirects: netlifySiteID: removeConditionalHeadComments: 1 removeHTMLComments: 1 removeWPLinks: 1 removeWPMeta: 1 rewrite_rules: rename_rules: s3Bucket: s3Key: s3Region: s3RemotePath: s3Secret: ******************* selected_deployment_option: zip targetFolder: /var/www/html_ssl/mystaticsite useActiveFTP: useBaseHref: useBasicAuth: 1 useRelativeURLs: 1 Installed extensions: Core date libxml openssl pcre zlib filter hash Reflection SPL session standard apache2handler mysqlnd PDO calendar ctype curl exif fileinfo ftp gettext iconv json mysqli pdo_mysql Phar posix readline shmop sockets sysvmsg sysvsem sysvshm tokenizer zip Zend OPcache Exclusion rules wp-json Crawling /
Hi @jbrinxs,
Sorry for the slow response.
The DOMDocument error is helpful – we’ll need that installed for PHP to properly parse any HTML files.
This may give some ideas for how to install – if still stuck, please let me know which OS you’re running: https://stackoverflow.com/questions/14395239/class-domdocument-not-found
I’ve added some notes for system requirements here, too:
https://wp2static.com/system-requirements/
Please let me know if that gets you over this error and if anything else remains that’s blocking.
Cheers,
Leon
ok, apt-get install php-dom did the trick, but it was strange not to see a warning as it was with curl or with zip.
Problem solved, was clear on the system requirements.
@jbrinxs great!
Yes, warnings for that in the latest development build – aiming to help raise any issues as early as possible.
Thanks for your patience!
Cheers,
Leon
- The topic ‘Unable to create static from site not in /’ is closed to new replies.