out of memory on wp 2.7.1 to d6 import attempt

ghmercado - May 31, 2009 - 13:34
Project:Wordpress Import
Version:6.x-1.0
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:lavamind
Status:closed
Description

I've been trying with no success at importing a Wordpress (2.7.1) 14mb xml file I've uploaded to /sites/default/files/wordpress to my drupal 6.12. I keep getting this error:

Fatal error: Out of memory (allocated 51642368) (tried to allocate 809 bytes) in /home/solid1/public_html/ke2/sites/all/modules/wordpress_import/wordpress_import.module on line 809

I've tried increasing memory via my settings.php and also tried adding the 'ini_set('memory_limit', -1);' at the bottom line on my wordpress.import.module, same result. I've not tried tweaking my .htaccess and php.ini though, thought I'd ask around here first. Have no idea why it stops at line 809 either.

please help? Many thanks.

#1

ghmercado - June 4, 2009 - 07:01

Managed to fix it by setting up xampp and hosting it locally on my PC. I only needed to edit php.ini, changing timeout to 0, and the process went smoothly. After a great deal of editing a bunch of posts (as to be expected after migrating any content from one site to another), I then exported the sql dump to my live server, and voila.

A few things:

  • When migrating wordpress authors (necessitating the creation of new users), why does it ask the author's email address? Why doesn't it just import the author's email addresses that are already there?
  • IMO the above process I mentioned (hosting it locally before taking it live) should be the de facto method of using this module, especially for xml files at least 5mb or more in size - indicating a relatively large number of posts to migrate. Like I said you're gonna have to do a bit of re-editing to fit the new theme etc., and may need to add a module or two to enhance / improve stuff, so might as well do it on localhost to save time and speed up the whole process. After which all you need to is migrate the db and you get everything done one time quick and clean. Just my 2 cents.
  • wonderful module. Without it I'd be trapped in Wordpress - which is excellent mind you, except that I've come to a point where it's not enough.

    #2

    FiNeX - July 17, 2009 - 14:26

    Probably the whole process shouldn't import all nodes togheter. For example, I'm trying to import an XML (about 15Mb) with 8700 posts and 2000 comments, php memory limit is 256M and is not enough.

    Probably this module should manage memory better (not everyone can set php memory limit).

    I suggest to paginate the import process: the module could import 1000 records, for example, and after other 1000 records and so on...

    #3

    yrocq - July 23, 2009 - 23:00

    I started to work on a version 2 of the module which uses batch_api to segment the importation. Unfortunately, I currently haven't much time to work on this module.

    #4

    FiNeX - July 24, 2009 - 10:58

    Good news :)

    #5

    lavamind - October 25, 2009 - 22:06
    Assigned to:Anonymous» lavamind
    Status:active» fixed

    Branch API is implemented in branch 6.x-2.x-dev, it should fix these kinds of issues.

    #6

    FiNeX - October 28, 2009 - 12:57

    Thanks. I will try in the next future.

    #7

    System Message - November 11, 2009 - 13:00
    Status:fixed» closed

    Automatically closed -- issue fixed for 2 weeks with no activity.

     
     

    Drupal is a registered trademark of Dries Buytaert.