Page 1 of 3
Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 9:46 am
by simonmlewis
[text]Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 45 bytes) in C:\xampp\phpMyAdmin\website\wp-includes\SimplePie\Parser.php on line 323[/text]
Hi.
I've been asked to move a Blogger site to Wordpress. Easy, or so it seems. But when I use the Blogger Install plugin, and install a 24mb file, I get this error.
My memory php.ini is set to 128mb. So what on earth is causing this? Sometimes it says tried to allocate 28bytes.
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 9:50 am
by Celauran
268435456 bytes = 256 MB
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 9:52 am
by simonmlewis
The XML file is only 23.3mb though................ ?!?!?!
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 9:58 am
by Celauran
What's more important is what is being done with it. That's where the memory is being eaten up.
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:00 am
by simonmlewis
Sure, but this is a fresh install. No other plugins. No Posts. No Pages. Not even a menu.
I literally installed Wordpress. Then installed the Blogger Install plugin, and trying to import this 23mb file.
Could it just be a really dodgy install somehow??
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:20 am
by Celauran
simonmlewis wrote:Could it just be a really dodgy install somehow??
More likely that the plugin is super inefficient. You may need to do it in chunks. Or, especially if it's a one off, just throw more RAM at it and get it done.
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:31 am
by simonmlewis
It would be a one-off yes. I did change php.ini's memory size line to 300MB, but that didn't work. Any other areas to alter in php.ini or wp-config??
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:36 am
by Celauran
simonmlewis wrote:but that didn't work
Bit vague, no? Did you restart the web server after having made that change? What about something like
Kinda gross, but if it's just once...
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:42 am
by simonmlewis
I have tried php.ini setting the memory_limit to 512m.
memory_limit=512M
I've also tried changing the wp-config with your code.
Both restarting apache after. But get the same result.
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:44 am
by Celauran
simonmlewis wrote:But get the same result.
The same as what?
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:46 am
by simonmlewis
Sorry? As in, each time the result is identical.
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 45 bytes) in C:\xampp\phpMyAdmin\website\wp-includes\SimplePie\Parser.php on line 323
If I do it in php.ini or in wp-config.
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:51 am
by Celauran
So the memory limit isn't changing, then. Have you tried it using ini_set? This is local?
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 10:55 am
by simonmlewis
This is indeed local.
How do I use it "ini_set"?
The code you supplied I put in wp-config.php, so I Assume that's not right.
I did just add that at the top of php.ini, but it caused an sql issue. Maybe it replaces the other one??
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 11:00 am
by simonmlewis
Re: Importing Blogger to Wordpress - memory size error
Posted: Fri Apr 01, 2016 11:00 am
by Celauran
It's possible ini_set is being overwritten elsewhere in the code. php.ini would be your best bet, though I can't say why it's not working. Barring that, try calling it right before the import is called. If that still doesn't work, you may want to try breaking the XML file into smaller chunks.