Support » Fixing WordPress » Memory Issues

  • Hey everyone,

    I’m having some issues with WP memory usage and the white screen of death. I’ve gotten rid of the white screens, but when trying to use the CSV Importer plugin, I get memory exceeded errors every single time after uploading just about 100 posts.

    It started when trying to import about 10000 posts with the CSV Importer. To avoid timing out during the import, I added “set_time_limit(1000);” to my wp_config file.
    At first it appeared to be working… the plugin screen went blank but I could still see that posts were being added. I got about 5000 of them imported before it totally stopped working.

    Then I couldn’t get anywhere. My front end was visible, by wp_admin was just a blank white screen. I guess this was my introduction to the infamous white screen of death. I searched around for a couple hours, seeing that often it can be a corrupt plugin and/or memory issue. So I removed the CSV Importer plugin. That made the admin dashboard load but almost nothing else. I couldn’t get to the post edit or plugin editor screens.

    A lot of people seemed to solve similar problems by increasing their memory limit. So I edited my wp_config file once again, and added “define(‘WP_MEMORY_LIMIT’, ’64M’);”

    Upon doing this I had full access to my backend again. I reinstalled CSV Importer. But upon attempting to import some more, I started running into the memory exceeded issues. I’ve tried altering the memory limit to 128, 256, and 1024… doesn’t seem like it changes anything.

    I’ve read around that often you cannot change your memory limit if your hosting provider defines it for you. I think this is the case for me. I use Liquid Web, and after emailing their support, it seems I have a PHP memory_limit of 50M. When I try setting that amount in wp_config, I’m back to just white screens everywhere. Even the front end doesn’t load. So apparently I can’t load WP unless I tell it to use 64M, but my PHP memory limit is still 50M? How does this make sense?

    I haven’t tried editing my .htaccess or php.ini files. My understanding was that setting the memory limit here would do the same thing as the wp_config. And possibly I don’t even have access to the php.ini with my server hosting. I’m going to try disabling some plugins to see if that helps free up some memory consumption, but I really don’t very many installed/enabled in the first place.

    Sorry if this was long. I just wanted to make sure I covered all the bases, so maybe someone smarter than me might be able to help 🙂 I really want to understand what is going on.

    Any thoughts/fixes?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should break the CSV into multiple CSV files. Do 100 at a time, or try 200, or 300. Whatever works. This is a much more reliable solution than messing with memory limits, importing, deleting posts, reimporting, etc.

    Alright, thanks for the tip. I guess I’m going to break the files down into smaller segments.

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