How to troubleshoot a failing export?
Whilst there are the beginnings of a Troubleshooting section on https://docs.wp2static.com/en/troubleshooting/, this post will help to quickly list the steps, in some order of time/cost to troubleshoot issues with your export or deployment.
Answer this topic with your own suggestions to be added.
Troubleshooting a failed export
- disable browser extensions
- try in a new incognito/private session
- anything in the browser's console?
- Open Network tab when exporting (slower) and inspect the last XHR request before export failed (ignoring WP "heartbeats"
- Is your site authenticated?
- use Basic Auth setting
- PHP Version
- Update to 7.2+
- Server environment
- windows IIS not supported (use Local by FlyWheel, AMPPS, WSL, etc)
- disable mod security
- disable mod pagespeed (does weird things to URLs)
- PHP max_execution_time - set this as high as you can
- PHP memory_limit - set this as high as you can
- cURL and zip extensions enabled for PHP
- CloudFlare or other security at the DNS layer, try disabling
- WordPress environment
- Permalinks need to be set (no index.php or query strings in your URLs)
- Conflicting plugins
- disable all but WP2Static
- Missing images, styles, etc
- switch to the default TwentySeventeen theme, if that doesn't export properly, the problem is more than just your theme
- open browser console to Network tab, reload exported site and check for any 404's
- open browser console to Console tab, reload exported site and check for any 404's, JS errors or mixed-content errors preventing things loading
- add any missing URLs to the Additional URLs field to force them to be crawled
- 22 replies
There are 22 replies. Estimated reading time: 12 minutes
- Wwebmaster90 @webmaster902019-04-25 16:20:50.909Z
The person who help me with this will deserve the entire world ...
I have a situation with my actual one page site, that actually is a course with some sections and information inside it, all builded with wordpress environment, elementor page builder and some other plugins.
The site is not so big, is just 90 MG, and was run in a local environment on XAMMP local server.
I have the relative path in which every file is allocated. The path is : C://xampp/localhost/curso1.
Inside "curso1" folder is all the wordpress onepage site. I work in an institute that requires that this must be uploaded to the MOODLE server environment that allows students to click on htmls and then those files opens up.
My question is basically, how can i export the whole site to a completely html file, and how will it works?
Thanks, let me know in advance asap!!!!!
can reply to my own email at : firstname.lastname@example.org
- TTony Harris @tgharris2018-12-20 15:17:10.026Z
I'm not sure here is where I ought to post questions, but I'm trying to export an established blog as static pages.
Yesterday, I upgraded PHP to 7.1 (latest supported) and set php.ini to allow up to 20 minutes for execution. I was able to crawl up to #581 before it hit an error.
I disabled every plugin I did not absolutely need and tried crawling again this morning and I can't get it to crawl at all.
Here's the error log:
2018-12-20 02:38:30 STARTING EXPORT: STATIC EXPORT URL https://www.lionsquarter.com/wordpress/mystaticsite
2018-12-20 02:38:30 STARTING EXPORT: VIA CLI?
2018-12-20 02:38:30 STARTING EXPORT: PLUGIN VERSION 5.8
2018-12-20 02:38:30 STARTING EXPORT: WP ADDRESS https://www.lionsquarter.com/wordpress
2018-12-20 02:38:30 STARTING EXPORT: WP HOME https://www.lionsquarter.com/wordpress
2018-12-20 02:38:30 STARTING EXPORT: WP SITEURL https://www.lionsquarter.com/wordpress
2018-12-20 02:38:30 STARTING EXPORT: WP URL https://www.lionsquarter.com/wordpress
2018-12-20 02:38:30 STARTING EXPORT: WP VERSION 4.9.9
2018-12-20 02:38:30 STARTING EXPORT: OS VERSION Linux boscustweb0803.eigbox.net 4.14.67 #1 SMP Fri Aug 31 16:31:50 EDT 2018 x86_64
2018-12-20 02:38:30 STARTING EXPORT: PHP MAX EXECUTION TIME 3600
2018-12-20 02:38:30 STARTING EXPORT: PHP VERSION 7.1.1
2018-12-20 02:38:30 STARTING EXPORT
- Leon Stafford @leonstafford2018-12-20 16:22:14.225Z
Please have a try with the latest pre-release, it's still got a little work before release, but usually gives a much better export:https://forum.wp2static.com/-30/how-to-install-the-latest-preview-of-version-59-of-wp2static
Hello Leon, My contact form isn't working after exporting the site!
To begin with, thank you for getting back to me so quickly, especially during the holidays.
Like you suggested I installed WP2Static 6 earlier today. Our blog is in a wordpress directory off our root--WP2Static site finds it at /hermes/bosnaweb15a/b800/ipg.lionsquartercom/wordpress/, but it can also be accessed at [domain name]/wordpress--I tried to save it to a empty static folder outside the wordpress installation.
The crawl seemed to go to completion, then WP2Static threw an error.
What I want is to convert our seven-year-old blog in our wordpress folder to static pages prior to moving to new hosting. I want to export these pages to the static folder so I can open them by going to [domain name]/static
My first question is: do I have the proper settings? How should I set this plugin?
My next question is: the 404 log has an awful lot of entries. (about as many as the site has files!) I'd like to send you my logs (tell me what I'm doing wrong!) but I don't want to post them in public! Is there a more discreet way to send them?
Oh! and Happy Holidays!
- Leon Stafford @leonstafford2018-12-24 05:11:15.141Z
Thanks, but no holidays when I'm doing my own project :) I do have my kids visiting me in Chiang Mai, Thailand, from Japan, so that's nice! When you're doing work you enjoy, every day is more like a holiday, anyway ;)
OK, so if we're seeing the errors on every page, that may actually be helpful in troubleshooting. Settings that may affect crawling/processing each page are:
- basic authentication: do you need a user/password when accessing the site? (confirm with a new Incognito/Private Browsing session in your browser, in case you've got it saved by default). There are fields to set this in the crawling options if you do need them
- write permissions to the folder you've set for export: try the ZIP method instead, as this only writes to the uploads folder, which you'd usually have permissions for
- server log: check your server's web server or PHP error logs at the time you do an export. If these aren't logging by default, you may need to adjust. Let me know where/how you're hosting if you're unable to find the logs and I can do some digging
The public-facing site itself needs no permissions to view. I, of course, set permissions for authors and admin. Would I need to give it my admin permissions for Wordpress?
I'll try the ZIP method now.
I'll also give you Christmas off. Enjoy your family!!!
- Leon Stafford @leonstafford2018-12-26 08:32:50.704Z
No need for any WP admin permissions.
The next step may be to replicate your site on a local development server known to work, such as Local by Flywheel or Trellis by roots.io.
I just wanted to give you a heads up--I ended up simply migrating my old blog to the new host. I'm thinking Wp-static would have worked better if this were a new-build blog rather than an existing site with dozens of posts and hundreds of items.
I wanted to thank you for all your help and I will keep you in mind.
- SShahala Anjum Choudhary @shahala2018-12-22 12:51:45.679Z
Hello Leon, My contact form isn't working after exporting the site!
- Leon Stafford @leonstafford2018-12-22 13:15:02.507Z
Please see this guide:https://docs.wp2static.com/en/getting-started/static-site-optimizations/contact-forms/
Hi Leon, I had created the form with gravity forms, but any changes I make in idex.html aren't reflecting in the site!
- Leon Stafford @leonstafford2018-12-22 21:23:21.438Z
You will need to make the changes in your WordPress site and re-export to static.
Hello Leon, when I re export the site, it's not working fine!! showing 404 error for subdirectory, and if I export as zip it's not coming either!!
- BRaymond @bossyan2019-12-31 07:11:17.361Z
Hi @leonstafford, I just want to add that I fixed it for my Ubuntu 18.04 server on Amazon S3 running PHP 7.2 and Nginx.
I ran these two commands
apt-get install php-xmlfor the crawling error. I did some googling about the errors and it seems like it needs this in order to crawl the site xml.
apt-get install php-zipfor the processing error. It needs this because it was missing the class ZipArchive
2019/12/31 07:05:30 [error] 26629#26629: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found in /var/www/dump/wordpress/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/ArchiveProcessor.php:2
I also increased the memory limit in
- @leonstaffordpinned this topic 2018-12-05 04:52:13.717Z.
- @leonstaffordpinned this topic 2018-12-05 17:57:06.900Z.
- @leonstaffordpinned this topic 2018-12-05 17:57:42.814Z.
- @leonstaffordpinned this topic 2018-12-05 18:05:00.758Z.