• Resolved w-sky

    (@w-sky)


    Hello,

    recently I have switched my WordPress site from PHP 7.4 to PHP 8.1 and though the site is running fine and slightly faster than before, I am concerned about the memory usage.

    Out of curiosity, I have the plugin WP-Memory-Usage installed on this site. It shows the WordPress memory limit and usage and a few other stats in the WP dashboard.

    With PHP 7.4 and before, the WordPress memory usage was around 2-8 MB.
    With PHP 8.1, the WP memory usage went up to over 28-30 MB.

    Since the (default) WP memory limit is 40 MB, with 30 MB this is now quite close to the limit. Should I increase the WP memory limit (PHP memory limit is 160 MB) or will it be just fine?

    • This topic was modified 3 years, 8 months ago by w-sky.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Does the memory usage go back to normal with all plugins except WP-Memory-Usage deactivated and the Twenty Twenty One theme in use?

    If you, re-activate each plugin individually and switch your theme back until you find exactly which one is causing the problem.

    Thread Starter w-sky

    (@w-sky)

    All plugins deactivated except WP-Memory-Usage and Health Check & Troubleshoot, usage still is 20 MB. If I activate a few “huge” plugins like WP Discuz, Yoast SEO, Jetpack, iThemes one after another, it increases 1-2 MB for each one up to 28 MB total.
    My conclusion is that it’s not one single plugin causing the intense memory usage, but of course each one adds a little.

    I also noted that memory usage is 4-5 MB lower when I switch my (admin) user language from installation default German to English. So even the internal WP translation system is adding 4-5 MB to the total. We are not using WPML here, it’s a single language website in German but you always can choose English US in WP user profile settings.

    Moderator James Huff

    (@macmanx)

    And what happens if you switch your theme to Twenty Twenty One?

    Thread Starter w-sky

    (@w-sky)

    I can see no difference, 32 MB with Twenty Twenty One and 32 MB with our theme.
    The exact WP memory load varies between 26-34 MB.

    Still I guess I should raise the WP memory limit, maybe set it to 80 MB instead of 40 MB. Our server has plenty of resources.

    Moderator James Huff

    (@macmanx)

    Yeah, I’d try that next. If there’s something very wrong, then usage will go up further after that.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Drastic increase of WP memory usage with PHP8 vs. PHP7 – critical?’ is closed to new replies.