Importer Memory Error (7 posts)

  1. ithacaindy
    Posted 3 years ago #

    I'm trying to import data (posts and pages) from one WordPress 3.5 site into another. When I select the .xml file, after a few minutes, the WordPress importer screen gives me this error:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 76 bytes) in /home/xxx/public_html/xxx/wp-content/plugins/wordpress-importer/parsers.php on line 465

    What is the fix and the cause?

  2. Using FTP you can try increasing the memory for PHP and WordPress in several different ways:

    1) You can edit the memory_limit line in your php.ini (if you have access to that file) to increase memory to 64M:

    memory_limit = 64M;

    2) Try adding the 'define" line below in your wp-config.php file a few lines of white space below the opening <?php

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

    3) If those don't work, try adding this line at the top of your .htaccess file:

    php_value memory_limit 64M

    If that doesn't work or throws a "500 Internal Server Error", delete the line from .htaccess.

    If none of those work, your host probably doesn't allow memory allocation overrides. You're stuck with what they give.

  3. ithacaindy
    Posted 3 years ago #

    I'll give your suggestions a try. In the meantime, I'm trying to limit the size of the import by exporting only published posts - which still hits around 49M.

  4. You may also need to increase php timeout limits. You also need to try splitting the WXR file. See WordPress WXR File Splitter (RSS XML)

  5. ithacaindy
    Posted 3 years ago #

    The file splitter seems interesting, but I'm on a Mac.

  6. ithacaindy
    Posted 3 years ago #

    Update 2: the memory define in config.php didn't help.

  7. ithacaindy
    Posted 3 years ago #

    Update 3: the memory limit in .htaccess throws a 500 error. Next step: ask host tech support for help.

Topic Closed

This topic has been closed to new replies.

About this Topic