PHP, MySQL, JavaScript, Windows 7, Linux
TPC! Memory Usage for WordPress
NEW RELEASE PLANNED FOR JAN. 2011, COME BACK SOON FOR MORE INFO!
TPC! Memory Usage allows WordPress administrators to view the current and peak memory usage of the application, have e-mail notifications sent when memory usage exceeds the set level, and provides a detailed system information screen. This is extremely helpful when testing new plugins, or if there are a lot of modifications, plugins, or large language files. A strategic dashboard widget will provide a snapshot which includes the following information:
- Monitor WordPress memory usage at various points
- Ability to add custom checkpoints (WordPress actions where memory usage is recorded)
- Log memory usage to files/database (checkpoints, when usage exceeds threshold, both, or none)
- Keep track of all-time highest memory usage (shows date and peak usage)
- E-mail notifications when memory usage exceeds set level w/ number of database queries
- Completes basic security check to help prevent attacks and malware injections
- View current memory usage
- View current peak memory usage
- Dashboard widget with memory meter
- PHP memory limit
- WordPress memory limit (defined in wp-settings.php)
- System information screen for monitoring server, MySQL, PHP, and WordPress statuses and settings
- Version: 0.9
- Last Release: 1/16/2010
Download Latest Version of TPC! Memory Usage from WordPress.org
- webjawns.com » TPC! Memory Usage released!
- TPC! Memory Usage
- webjawns.com » WordPress memory usage reduced from 14MB to 1.4MB
- Chris Strosser (webjawns) ‘s status on Wednesday, 09-Sep-09 04:12:51 UTC – Identi.ca
- eAccelerator für WordPress – bueltge.de [by:ltge.de]
- Como Reducir el consumo de Memoria de Wordpress | MundoTech.net
- webjawns.com » TPC! Memory Usage 0.4 for WordPress released!
- ¿Problemas de memoria con Wordpress?, no hay problema | Ni’palante Ni’patras
- Mehr Speicher für WordPress freimachen
- Chuletillas (y XX) – Más memoria para Wordpress : Un lugar en el mundo…
- Major improvements in TPC! Memory Usage for WordPress « webjawns.com
- Load Average en Wordpress con el plugin TPC! Memory Usage : Un lugar en el mundo…
- Trivialidades » Blog Archive » Problemas de memoria con Wordpress
- Wordpress and Server RAM: Your (many) Plugin Uses (much) Memory | IMBM – Internet Marketing By Me
- TPC! Memory Usage Honorable Mentions « webjawns.com
- Optimize your Blog’s Performance and SEO with these Powerful Tools — Blair Williams
- 4 Powerful Tools to Optimize Your Blog | World Internet Summit Speakers
- WordPress for Dummies : El Blog de Loretahur
- Statpress Plugin Deactivated | Ideas.Think.Share
- Huge List of Cool WordPress Plugins-Part 3
- Wordpress desde cero · Assistant Solution
- Blogparade: Zeigt her eure Instrumentenbretter | blog.dunkelwesen.de
- Blogparade: So sieht mein Dashboard aus | Chaosweib's Chaos-Blog
- The Blackboard » Test of Memory Usage
- Test of Memory Usage – My Habari
- SaunaScape » Increasing Memory Limits in WordPress
- 18 Useful WordPress plugins — Jim Raffel
- 18 Useful WordPress plugins
- Mysteries about the WordPress Memory Limit | hakre on wordpress
- Blogparade – ich zeig euch meine Plugins | Chaosweib's Chaos-Blog
- WordPress Plugin Parade 2011 – #1 » Zitterkopf

September 1, 2009 - 12:14 am
when I updated to the current version 0.3.1 I suddenly got a bunch of over memory limit alerts from my host which is bluehost.com. Not sure if this is due to something changed in your script or something in another plugin that I use, once I deactivate TPC! Memory Usage the alerts stop.
September 1, 2009 - 12:18 am
Hi Chris,
Are you sure that the notifications you are getting aren’t being sent by TPC! Memory Usage? Version 0.3.1 actually has notifications sent by default if the memory usage exceeds 16MB. They would be from whoever hosts your site if you don’t have your own server (usually), so that makes sense. I included an example of what they look like below. You can deactivate them or increase the memory threshold within the TPC! Memory Usage settings section.
They look something like this…
Subject:
[blogname] High memory usage notification
Message:
WordPress memory usage exceeded xx MB
WordPress peak memory usage: xx MB
-Chris
September 9, 2009 - 1:16 am
this is a great tool, thanks! Any tips on how decrease memory usage in shared hosting?
September 17, 2009 - 1:21 am
Felicidades.. muy buen artículo…
October 29, 2009 - 3:55 pm
I like this plugin quite a bit, but wish it had the ability to show me a log of activity over time.
Also, I have a virtual dedicated server account. It has a 256M cpu limit on memory. I’m way over that running 30 WordPress sites and trying to find the trouble makers.
All that said, I can’t tell from the descriptions if the numbers reported with this plugin are memory used per domain, or total for my account (I think it is per domain, but I’d like to know for sure)
October 29, 2009 - 7:35 pm
@brettbum
Hey brettbum,
The activity log is something I’m actively working on. It will be included in the next major release.
As far as the second comment… do you have thirty separate sites, or are you using WP Mu?
Thanks,
Chris
December 8, 2009 - 7:01 pm
Hey Chris,
Awesome plugin! I got a question that maybe you can help me with. I’m running WPMU 2.8.6 on a shared host. Trying to run a script that keeps running out of memory. The host has defined a local php.ini file in the domain root upping the limit to 64M.
Here’s the kicker. Your plugin and WordPresses internal check (via wp-settings.php) still report 32M, thus scripts still don’t run.
However, phpinfo() reports 64M. If I run a plain php test file using the following code:
echo ini_get(‘memory_limit’);
echo ”;
$memlimit = ( @ini_get(‘memory_limit’) ) ? ini_get(‘memory_limit’) : ‘N/A’;
echo $memlimit;
$phpvars = ini_get_all();
echo ”; print_r($phpvars); echo ”;
Everything reports 64M and from ini_get_all:
[memory_limit] => Array
(
[global_value] => 64M
[local_value] => 64M
[access] => 7
)
I’m baffled what it is about WordPress that insists on pulling 32M, which I’m sure is the server config.
Any thoughts?
December 8, 2009 - 7:20 pm
WOW! Don’t I feel like the tool. I figured it out, had to put a local php.ini the wp-admin, I forgot that’s a whole separate piece. DOH! Anyway, great app, love it.
December 8, 2009 - 11:37 pm
Thanks so much for your feedback!
Did you add the WP_MEMORY_LIMIT constant to your wp-config.php file? As long as the php.ini file is setup correctly, this will up the WordPress internal memory limit to 64MB, and effectively bypass the 32MB limit as set in wp-settings.php.
define(‘WP_MEMORY_LIMIT’, ’64M’);
I hope this helps!
-Chris
December 20, 2009 - 8:10 pm
I tried to install and got the following error message:
Plugin could not be activated because it triggered a fatal error.
Warning: require_once(tpcmem-security.php) [function.require-once]: failed to open stream: No such file or directory in /home/myhdtvch/public_html/artoftheiphone/wp-content/plugins/tpc-memory-usage/tpc_memory_usage.php on line 42
December 20, 2009 - 8:24 pm
Hey Alan,
I’m so sorry about that! For whatever reason, the tpcmem-security.php file was not included when I posted version 0.5.
I fixed the problem. Deleting the plugin, and installing again will fix the problem. I was able to test and confirm this is working now, so you should be good to go.
Again, sorry for the inconvenience!
-Chris
December 21, 2009 - 1:27 am
Fatal error: Call to undefined function apache_get_modules() in /home/cdcr1985/public_html/blog/wp-content/plugins/tpc-memory-usage/tpcmem-security.php on line 19
I delete and installed Again… Version 0.4 worked fine.
December 22, 2009 - 12:14 am
Hi cdcr1985,
I was able to get this fixed yesterday around 8:30 PM (see previous comment). I tested this again today just to make sure… try clearing your browser cache, deleting any temporary files, and redownloading.
http://downloads.wordpress.org/plugin/tpc-memory-usage.0.5.zip
Please let me know if you have any more problems.
Thanks!
-Chris
December 23, 2009 - 2:42 pm
V 0.5.1 works Fine, thanks!
December 30, 2009 - 12:06 pm
Hi Chris,
)
I currently Updated to 0.6…
Now I get a Mass of E-Mails telling me, memory of 64 MB is exceeded by 31xxx MB … Seems it uses KB for usage in the Mailermodule… Waaah
Fix it please (hat to use a mailfilter to delete that tons of mails
December 30, 2009 - 4:01 pm
New problem, the plug-in sent me 1000+ mails with this message:
WordPress memory usage exceeded 64 MB
WordPress peak memory usage: 26295064 MB
26295064Mb or similar it’s to weird. last night I updated the plug-in from 0.5.1 to 0.6 and gives this problem.
December 31, 2009 - 12:53 am
Hi Felix,
I’m so sorry about this. I fixed this bug as soon as I found out (@see version 0.6.1). I hope it didn’t cause you too much trouble. Again my apologies! Look for the first major release (1.0) soon… I’ve added a few big features that will definitely help everyone out. Happy New Year!
-Chris
January 3, 2010 - 9:35 am
I am happy the bug was fixed, I had the same problem above, as a result, my host suspended my account for exceeding CPU quota. I was not easy to convince to re-activate my website. After checking around I realized the plugin was the source of the problem. Now I am worried about updating to v 7. Else, very useful tool so far
January 3, 2010 - 10:03 am
Hi Justin,
The high CPU usage must be caused by another plugin. This plugin uses VERY little CPU/memory; otherwise, it would defeat the entire purpose. I have this plugin running on several high traffic web sites with not a single problem. I’ve done testing to ensure there are no problems in this arena and this is still the case.
In version 7, you can add custom checkpoints to measure the memory usage at any point within the script where there is a WordPress action. This should help you to better diagnose the problem.
- Are you using shared hosting?
- What other plugins do you have activated? Any language files?
-Chris
January 3, 2010 - 10:53 am
The only change I made was updating the TCP! plugin (I use a shared account, no issue so far x 2 years), Then few minutes after that I noticed my website was suspended. Then I checked my email when I got home and I had 100′s if not 1000′s of emails telling about exceeding my memory limit. I tried deactivating different plugins without a change, kept receiving emails every-time I refresh a page (there was a mention of ‘shutdown’ or sth like that can’t remember (I placed my site was on maintenance mode after my account was reactivated), then noticed that there was another update of the plugin few hours later and I installed it. After that everything went back to normal until now. Except for the 2nd update that day, I did not need to make any other change for it to stop. My website has been with that hosting service for about 2 years now without major issue and I use a very limited number of plugins and no widget thanks to my very functional theme. Else the plugin is absolutely great and I am still using it. Was just a weird coincidence between updating it (from work, which I will never do anymore) and the sudden firing of TCP! emails from WP.
January 3, 2010 - 11:22 am
I know you already know this, but I want to readdress something… the high memory usage e-mail notification is a feature of the plugin; however, there was a bug in 0.6 (fixed in 0.6.1) that caused e-mails to be sent out each time the page was loaded (it was using comparing bytes instead of megabytes).
I had a problem with cPanel once that caused my hosting service to shut off my account (after explaining what happened it was quickly restored), and e-mail is most likely the reason that your hosting company had a problem. You can adjust the memory usage threshold or turn off the e-mails in settings. Once again, my apologies that the mass e-mails caused you to have issues.
As for the CPU usage… the CPU/memory usage of this plugin is extremely low. That much I promise you!
-Chris
January 3, 2010 - 11:47 am
I fully agree. I cannot run my website without that plugin and I can only recommend it. I already upgraded to the latest version earlier today and I have no problem with it. It has helped me a lot to identify demanding plugins and to limit my website to essential ones. The first thing I check after I log in or after installing a new plugin or even after performing an update is the memory usage displayed.
January 4, 2010 - 7:55 pm
Hi Chris,
Could you please explain what the difference between Usage Sample, Peak Usage, and All-Time is? I think Usage Sample is the current use. I don’t understand what’s different between Peak and All-Time although there clearly is some sort of difference because I have two different values, and it obviously wouldn’t be there if it was the same.
Thanks for a great plugin!
January 4, 2010 - 10:13 pm
Of course! I’ve outlined them below for you:
Usage Sample – the current memory usage when the dashboard/comment is displayed
Peak Usage – the peak memory usage as reported by PHP for the current script
All-Time – the peak memory usage as defined by checkpoints since plugin was activated or last stats reset
I hope this answers your questions. Thank you for the kind words and support!
-Chris
January 5, 2010 - 11:49 am
Other possible bug?
In my dashboard shows php memory 64Mb
http://yfrog.com/iydashboardj
in php overview shows 128Mb
http://yfrog.com/1gsysoverj
And in cpanel, php configuration shows
http://yfrog.com/jmcpanelj
in previous versions, the dashboard showed the 128Mb, but in the 0.7th version shows a different number.
January 5, 2010 - 9:34 pm
Hey cdcr1985,
Thanks for reporting this. I found the bug… WordPress changes the runtime value of ‘memory_limit’ so when we used ini_get(‘memory_limit’), it wasn’t pulling the original php.ini configuration value. The PHP memory limit is now pulled from the php.ini directive instead of the runtime variable. This fix is as of version 0.7.2.
Thanks again, cdcr1985! You’ve been extremely helpful in finding some of these issues.
-Chris
January 6, 2010 - 9:47 am
Chris
I am having the same problem as cdcr1985. my dashboard shows 24M for PHP Memory Limit when i have my htaccess file set to 128M. This was working fine up till the last couple of updates. i update all plugins immediatetly upon release and am running 0.8
January 6, 2010 - 4:45 pm
Hey, nice plugin. I do seem to have a couple issues however.
1) When I create an info.php and check, it says my memory limit is 64mb and that magic quotes is off, your plugin only reports 32mb and magic quotes as on.
2) My blog error_log has around 30 of this entry in it since I installed the plugin last night:
[06-Jan-2010 21:24:59] PHP Warning: Missing argument 1 for __lambda_func() in /home/jakets/public_html/blog/wp-content/plugins/tpc-memory-usage/tpcmem-checkpoints.php(133) : runtime-created function on line 1
My php version is: 5.2.11
Wp Version is: 2.9.1
Thanks!
January 6, 2010 - 6:59 pm
Thanks for the feedback! Responses are in red above.
-Chris
January 6, 2010 - 7:13 pm
Thanks for the feedback! Responses are in red above.
-Chris
The only code I am using in the info.php is:
You may view the info here for a while, then I will remove the file: http://farmvillefanatic.com/info.php
Hope it helps! As of right now, the plugin is still showing 32mb and magic quotes on.
January 6, 2010 - 11:26 pm
I tried your latest 1.8.1 Version and this is still reporting values incorrectly. I have raised my memory limit to 128M and it is still showing 32M.
January 6, 2010 - 11:54 pm
Hi Jake,
I’ve tried several different development environments including CentOS, Ubuntu, and Windows 7… all with Apache 2.2.13/.14. I’ve tried PHP 5.2.11, 5.3.0, and 5.3.1. I can’t seem to replicate this issue. If you want to contact me via e-mail about this, I’d be happy to try to delve into your situation more.
Have you tried restarting your server? Keep in mind this pulls the PHP memory limit from the global php.ini file. That means it won’t be affected by changes after that (runtime, .htaccess, etc.).
I hope this helps a little.
-Chris
January 7, 2010 - 12:37 am
I couldent find a way to contact you by email, but here is the chat I had with my host:
January 7, 2010 - 9:51 am
still having the exact same problem with the newest version
January 7, 2010 - 2:13 pm
Great plugin! However, I’ve encountered a bug since upgrading to 0.8.0 (had previously been on 0.6.something I think) and still having the same issue on 0.8.1 – TPC is computing my memory usage percentage based on the PHP memory limit (16M) and not the WordPress memory limit (32M). Since WordPress dynamically changes the memory limit to the value it’s configured to use, my 25MB memory usage should be reported as 78%, not the 157% it’s showing as.
January 7, 2010 - 6:59 pm
Hi Chris,
Really great plugin. I am about to develop similar tool but yours really do the job! Well done & Thanks!
2 small feedback as my contribution:
1. ability to “reset” all time peak could be useful feature
2. detection of apache module (mod_security) could be misleading as the signature not always “mod_security” or “mod_security2″. I sent one of my non-geek friend in a bit of panic mode as your plugin indicates no mod_security but it’s actually has different signature of “security2_module” – perhaps a warning that the host could alter the name and user should check with their host will be more useful for non-technical user.
But, well done – I’ll create a massive article based on your tools ! Watch out your traceback !
January 7, 2010 - 7:49 pm
Hey Kromey,
Thanks for the feedback. I’m fixing this and it will be in the next release. Great catch!
-Chris
January 7, 2010 - 7:52 pm
Hi Denis,
1. You’ll be happy to know that this feature is available already. You can find it on the Settings page.
2. Thanks so much for pointing this out. I’m going to come up with a statement to this effect for the next release.
…and last, but not least, thank you for your support. I look forward to reading the article!
Thanks to everyone who has helped out with this!
-Chris
January 8, 2010 - 7:25 am
Hi there,
Nice plugin, thank you for making it available!
A question: is it meant to send out notifications every 5 seconds when the memory usage exceeds the threshold? Isn’t just one notification sufficient?
Or once every 10 minutes or so?
January 12, 2010 - 11:27 am
hi there! this seems to be a great plugin, but i have a question…
i have a shared server with a bunch of wordpress instalations, and i usualy get 500 internal server errors…
i know i’m having memory issues, but i can’t seem to be able to find out the cause…
does this plugin would allow me to identify it? or is just a way of monitoring overall memory usage?
thanks
January 12, 2010 - 8:32 pm
Hi Marko,
Currently, the plugin sends out a high usage notification anytime the usage exceeds the threshold. This can happen multiple times in a single request if Ajax requests also exceed the threshold. This is something I’ve thought about, and in the future we will add a few features that will allow administrators to have more control over when e-mails are sent. For the time being, I would suggest raising the threshold to a higher level.
Thanks for your support!
-Chris
January 12, 2010 - 8:40 pm
Hi det,
Yes! This plugin can help pinpoint exactly where memory usage is at its peak. I plan on writing a guide on how to best use this plugin eventually, but here’s a few pointers to hold you over until then.
1. Look for WordPress actions within the plugin files, and write them down. It may look like this… do_action(‘delete_post’). TPC! Memory Usage will log memory usage at each of those checkpoints. By measuring the difference in usage between different checkpoints, you can find out where your problem areas are.
2. Add all those actions as checkpoints within the WordPress administration panel. (Memory Usage > Add Checkpoint)
3. Turn on file logging, and set the log level to ‘always’ or ‘checkpoints_only’.
4. Visit some of the sections on your blog – tags, search, index, etc. All data will be recorded within /wp-content/plugins/tpc-memory-usage/logs/tpcmem.log, which can be viewed within any text editor.
5. Turn off file logging when done. (You should avoid file-based logging on production sites, as it can slow things down a little. If it’s a low traffic site, you may not see much of a difference. YMMV)
I hope this helps!
-Chris
January 23, 2010 - 12:44 am
Hi,
Thanks for making this plugin. When ever I try to activate it, I see this error:
Parse error: parse error, unexpected T_ARRAY, expecting ‘)’ in /chroot/home/anaconda/hiddenanime.com/html/forums/word/wp-content/plugins/tpc-memory-usage/tpcmem-checkpoints.php on line 206
Any idea what I should do? I have the latest version installed – (.9).
Thanks in advance
January 23, 2010 - 10:20 am
Hey James,
My educated guess is that you are using a PHP version less than 5.1. This application uses array type hinting at that exact point, which isn’t available until PHP 5.1+. Can you check and get back to me? If that’s not it, we’ll take a look again.
Thanks!
-Chris
January 24, 2010 - 1:59 am
Chris,
You are right! I checked with my host and they only have 4.3.11 of PHP installed.
Is all hope lost for me?
Your plugin is really well rounded, but I am really looking for the cpu stats and memory stats. If there is no way around it, is there something I can do with my 4.3.11 that would allow me to view those two items?
Thanks in advance
January 24, 2010 - 6:21 pm
Hi James,
Unfortunately, your best bet is to update to PHP5. PHP4 is losing support rapidly, not to mention it is lacking in MANY features. I think v0.5.1 should work for you, but it lacks most of the new features (see changelog).
Is there anyway you can get your provider to upgrade to PHP5? If not, you can always switch to a new provider (many offer BOTH PHP4/5).
I hope this helps!
-Chris
February 7, 2010 - 2:39 pm
Looks like a great plugin. However, once I install it my DashBoard will no longer display all the screen options? Plugin looks like it works fine. Hosted on blue host with WP 2.9.1. Intested in your thoughts.
February 7, 2010 - 2:41 pm
Hi Mort,
This is a new one! Could you show me a screenshot so I can see what’s going on? I will do my best to help figure this out.
Thanks!
-Chris
February 8, 2010 - 10:10 pm
Ok here is my screen selection options:
http://dl.dropbox.com/u/42509/show_on_screen_options.png
Here is my dashboard normally:
http://dl.dropbox.com/u/42509/Normal_DashBoardScreen_No_Plugin.png
Here is my dashboard after plugin installed and active:
http://dl.dropbox.com/u/42509/After_Install_and_plugin_active.png
Not sure if it’s a conflict with another plugin or what but I’m looking for some enlightenment…
February 8, 2010 - 10:36 pm
Hey Mort,
It appears to be specific to Internet Explorer (works in Firefox, Chrome, etc.). I’ll look into a fix for 0.9.1. Thanks for reporting this!
-Chris