• Resolved golanlevin

    (@golanlevin)


    Dear Scott & co.,
    Thank you for creating this plugin, which is badly needed.

    Unfortunately, I’m having an error getting it to work. I’m attempting to generate a static version of my site (https://golancourses.net/2014), which is running WordPress 4.5.1 on a MediaTemple server running PHP 5.5.31 CGI (Latest).

    When I attempt to generate a static site (whether Zip or Local Directory), I get the following error report:

    [2016-05-03 03:26:34] Setting up
    [2016-05-03 03:26:35] Fetched 0 of 2 pages/files
    [2016-05-03 03:26:37] Error: (1) Allowed memory size of 41943040 bytes exhausted (tried to allocate 771895 bytes) in /nfs/c01/h04/mnt/12336/domains/golancourses.net/html/2014/wp-content/plugins/simply-static/includes/class-simply-static-archive-creator.php on line 365

    I’m not sure how to address this error. Could you kindly advise me as to where I should allocate or request more memory?

    Thank you very much,
    Golan Levin

    https://www.ads-software.com/plugins/simply-static/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Golan,

    I’m going to have a version of Simply Static released later this week which may help fix this issue. Try that out and let me know if it fixes your issue. If it doesn’t, here are some things you can try to increase the amount of memory available to WordPress/PHP:

    1. If you have access to your php.ini file, change the line in php.ini
    If your line shows 32M try 64M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

    2. If you don’t have access to php.ini try adding this to an .htaccess file:
    php_value memory_limit 64M

    3. Try adding this line to your wp-config.php file:
    Increasing memory allocated to PHP
    define(‘WP_MEMORY_LIMIT’, ’64M’);

    4. Talk to your host.

    Best,
    Scott

    Thread Starter golanlevin

    (@golanlevin)

    Hi, Scott.

    I’m delighted to report that I was able to generate an archive of my (v. 4.5.3) WordPress site after (only) following Step 3 of your recommendation, which was to add the following to the wp-config.php file:

    define('WP_MEMORY_LIMIT', '64M');

    I should mention that, until I followed your suggestion above, the most recent version of Simply Static (1.6.0) produced the same errors as previously, despite your other improvements and bug fixes. So the modification you suggested was definitely necessary. For what it’s worth, my site is hosted on a MediaTemple Grid-Server.

    The site I backed up is fairly small, with only 60 pages or so. So it might be worth adding code to check what the users’ PHP memory limit is, and adding in your recommendations to the error reporting.

    I didn’t get around to trying to modify the php.ini; that would have been next on my list.

    Thanks again for a quality plugin, I’m grateful.
    Best wishes,
    Golan Levin

    Thread Starter golanlevin

    (@golanlevin)

    Well, I was incorrect. As I’ve moved on to larger sites, I’ve encountered the same problem again. It turns out the the memory limits specified in my php.ini were probably overriding my request in wp-config.php. If anyone else encounters this issue: be sure to check both.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Memory exhausted; where can I fix this?’ is closed to new replies.