Is more PHP memory necessary because my site is slow? We explain how it actually works.
How Does PHP Memory Work?
Don’t worry – we’re not going to dive too deep into the tech stuff! 😄
Here we go: PHP is the programming language that powers WordPress. It tells your site what to do – whether that’s showing content on the screen or sending an email notification when someone leaves a comment.
All of these instructions (from WordPress itself, as well as from plugins) are stored in separate files – the ‘.php'
files, like ‘wp-login.php'
, which you might know from logging in to your site.
When you load your WordPress site in your browser – or when you’re editing a post – this is roughly what happens behind the scenes:
- The core WordPress components are loaded
- Any must-use (mu-) plugins and network-activated multisite plugins are loaded
- All active plugins are loaded
- Your theme is loaded
📌 Note for the geeks among us: Try opening ‘wp-settings.php'
in your favorite code editor!
So as you can see, quite a few steps are required to make WordPress do what it needs to do — like loading your posts and pages. All those PHP files and instructions are loaded into the server’s temporary memory (also known as RAM). Sometimes, those PHP instructions also fetch data from your database ahead of time and store it temporarily for use. That uses even more PHP memory.
By the way, the options table in your database is also loaded by default – it includes things like your site title and description.
So: The more plugins you install, the more PHP memory your site will need.
Also: In general, the number of revisions and posts on your site doesn’t have much impact on your PHP memory usage. They do take up space in your database, of course, but their contents are usually only loaded when you view or edit a specific post.
It’s also very possible that ten lightweight plugins with just a few simple PHP instructions use the same amount of memory as two “heavier” plugins with more complex functionality.
So you can’t judge memory usage by plugin count alone.
But you can measure how much PHP memory your site is actually using.
How Much Memory Is My Site Actually Using? Measuring is knowing.
Luckily, you don’t need any programming skills to find out – there’s a simple plugin for that.
Just go to Plugins and click “Add New”, then search for “memory” and install this small plugin: ‘Server IP & Memory Usage Display’.

After installing the plugin, you can see the memory usage at the bottom of your WordPress admin dashboard.
For this example, I used a standard WordPress installation on our server, with only the plugin “Server IP & Memory Usage Display”, our own plugins, and the slightly older TwentyFourteen theme enabled. Here’s part of the output shown:
Memory: 21.57 of 128 MB (17%) | WP LIMIT: 40 MB
What can we learn from this?
- Just to load a basic WordPress setup with a few small plugins, the site already uses 21.57 megabytes of PHP memory.
- The server I ran this test on allows a maximum of 128 MB of PHP memory per request.
- Note: There’s a small bug in the plugin – it shows a WordPress memory limit of 40 MB, even though the server actually allows up to 128 MB. You can safely ignore that number.
For an average WordPress site with several plugins, it’s quite normal to need around 45 MB of PHP memory. So make sure to take this into account when choosing a WordPress hosting provider. We guarantee at least 92 MB of PHP memory on all of our hosting plans.
Which plugins have a high load time?
Note: This list is not exhaustive and plugin performance can vary depending on the capabilities of your WordPress hosting provider.
These plugins tend to use relatively more PHP memory or can significantly slow down your site.
Fortunately, using (object) caching can speed up some of them considerably.
- WPML
- Jetpack
- WooCommerce (especially when used with WPML)
- Yet Another Related Posts Plugin (YARPP)
- WP-PostViews
- WP-Slimstat
What happens if you need more memory than the available megabytes?
In that case, WordPress won’t be able to load all plugins or data, and you’ll see an error message on your site like “Fatal error: PHP memory exhausted.” And yes – this happens quite often. A quick Google search for that error already shows over half a million results!
That’s exactly what you want to avoid. If you run into this, you have two options: Ask your web host to increase your PHP memory limit, or Optimize your site so it needs less memory. From a performance standpoint, optimization is always the better choice – your site will run faster and more efficiently.
Reduce your PHP memory usage
Usually the simplest and fastest option: Remove WordPress plugins or switch to a better theme. A “better” theme in this case means one that uses PHP memory more efficiently. ”No longer using a certain plugin? Deactivate it – and delete it too, for security reasons. If your main concern is speed, take a look at the plugin P3 (Plugin Performance Profiler). It can measure how much load time each plugin adds to your server.
You can also gain performance by cleaning up your database: Take a look at the options table in your database. Are there large values set to autoload = yes?
You can safely change those to autoload = no. This prevents them from being loaded on every single request. Worried it might break your site? Don’t be. If a plugin or theme actually needs one of those options, it will still retrieve it via a separate request – so everything will continue to work just fine.
The same goes for transients with autoload = yes – it’s perfectly safe to switch them to no. Using Memcached or APC for transient and object caching is a much more efficient solution. You can enable this easily by using a caching plugin like W3 Total Cache.
Whatever you do: keep measuring the difference. In general, a site is faster when it uses less PHP memory. That’s because it has to load fewer instructions. But that’s not the whole story – for example, if a small plugin fetches information from another site in the background and that takes 10 seconds each time, you can still end up with a slow site even though it uses little PHP memory.
Also interested in speeding up your site? With us, you get object caching by default, and W3 Total Cache runs at peak performance on our platform — even when combined with Ecommerce Hosting.
We’re also happy to help you optimize your site.
Beyond just checking your PHP memory usage, we can help you improve load times — so both your visitors and search engines stay happy.
Comments
No comments yet.