Support » How-To and Troubleshooting » Importer Memory Error

Importer Memory Error

  • 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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Mark Ratledge


    Forum Moderator

    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.

    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.

    Moderator Mark Ratledge


    Forum Moderator

    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)

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

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

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Importer Memory Error’ is closed to new replies.