No internet connection
  1. Home
  2. Support

How to troubleshoot a failing export?

By Leon Stafford @leonstafford2018-12-05 04:34:17.288Z2018-12-27 05:45:09.365Z

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

  • Browser
    • disable browser extensions
    • try in a new incognito/private session
    • anything in the browser's console?
      • JavaScript errors
      • 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
  • 18 replies
  1. T
    Tony 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
    2018-12-20 02:38:30

    1. Leon Stafford @leonstafford2018-12-20 16:22:14.225Z

      Hi Tony,

      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

      Cheers,

      Leon

      1. SShahala Anjum Choudhary @shahala2018-12-22 12:50:28.573Z

        Hello Leon, My contact form isn't working after exporting the site!

        1. In reply toleonstafford:
          TTony Harris @tgharris2018-12-24 02:31:52.257Z

          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!

          1. Leon Stafford @leonstafford2018-12-24 05:11:15.141Z

            Hi Tony,

            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

            You can email me through the logs at leon@wp2static.com or put them in a private Paste Bin and email me that link: https://pastebin.com

            Cheers,

            Leon

            1. TTony Harris @tgharris2018-12-24 23:07:56.695Z

              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!!!

              ^_^

              1. Leon Stafford @leonstafford2018-12-26 08:32:50.704Z

                Thanks Tony!

                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.

                Cheers,

                Leon

                1. TTony Harris @tgharris2019-01-12 01:06:20.930Z

                  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.

      2. S
        In reply toleonstafford:
        Shahala Anjum Choudhary @shahala2018-12-22 12:51:45.679Z

        Hello Leon, My contact form isn't working after exporting the site!

        1. Leon Stafford @leonstafford2018-12-22 13:15:02.507Z
          1. SShahala Anjum Choudhary @shahala2018-12-22 14:22:12.885Z

            Hi Leon, I had created the form with gravity forms, but any changes I make in idex.html aren't reflecting in the site!

            1. Leon Stafford @leonstafford2018-12-22 21:23:21.438Z

              Hi Shahala,

              You will need to make the changes in your WordPress site and re-export to static.

              Cheers,

              Leon

              1. SShahala Anjum Choudhary @shahala2018-12-24 14:57:33.200Z

                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!!

                1. Leon Stafford @leonstafford2018-12-26 08:33:54.398Z

                  Hi Shahala,

                  Can you please post your log files here or email to me: leon@wp2static.com

                  You can find the Export Log in the "Logs" tab within the plugin.

                  Your server's PHP error logs may give more information.

                  Cheers,

                  Leon

        2. Progress
        3. @leonstaffordpinned this topic 2018-12-05 04:52:13.717Z.
        4. @leonstaffordpinned this topic 2018-12-05 17:57:06.900Z.
        5. @leonstaffordpinned this topic 2018-12-05 17:57:42.814Z.
        6. @leonstaffordpinned this topic 2018-12-05 18:05:00.758Z.