• Hi,
    I wrote a plugin that’s been out for about 1 year and now doing some testing on an upgrade on my local machine. Out of the blue, I just started getting this error (not as a result of any coding change or adding plugins)

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 80 bytes) in /Users/me/Dropbox/My Webs/wordpress/wp-includes/class-simplepie.php on line 14866

    Asking users to increase their memory doesn’t make sense since plugin users aren’t always that tech savvy.

    So, I’m wondering if I can do this for them by adding something like

    (‘WP_MEMORY_LIMIT’, ’128M’)

    But is this ok to do..meaning changing their wordpress memory limit just for my plugin? Is there something else you’d suggest?

    Thanks,
    Allen

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ayman

    (@aymanalzarrad)

    Using

    (‘WP_MEMORY_LIMIT’, ’128M’)

    will limit the whole website… So why don’t you try this:
    Put this line of code in the main file of your plugin so when the plugin runs will load the limits directly.
    ini_set('memory_limit', '128M');

    Thread Starter Allen

    (@amweiss98)

    Thanks Ayman…will need to think about this since I’ve seen on some other sites that increasing the memory is bad form for wordpress plugin developers…might need to do this on a case by case basis when a user has a problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Should I Increase Memory in My Plugin?’ is closed to new replies.