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 |
Jump to:
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
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:
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
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
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
Good news :)
#5
Branch API is implemented in branch 6.x-2.x-dev, it should fix these kinds of issues.
#6
Thanks. I will try in the next future.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.