PHP/MySQL-driven development, Windows 7, JavaScript
WordPress
TPC! Memory Usage: Honorable Mentions
Feb 21st
I’m proud to say that TPC! Memory Usage for WordPress has been adopted by a lot of WordPress administrators out there, and initial reviews have been great. Today, I found a few articles that TPC! users may find useful and interesting, including one which benchmarks popular WordPress plugins.
- WordPress and Server RAM: Your (many) Plugin Uses (much) Memory – TPC! Memory Usage driven benchmark of memory used by popular WordPress plugins
- The Answer of X-Factor: What Your Web Hosting Don’t Want You to Know – Informative article discussing CPU load averages, shared hosting, memory usage, etc.
- Ten Useful WordPress Plugins You May Have Missed – Honorable mention prior to custom checkpoint implementation
- WordPress CMS Review at WebHelper Magazine – Cited as a “key plugin”
If we missed an article, please let us know so we can post it. Thank you to everyone for your continued support!
Major improvements in TPC! Memory Usage for WordPress
Jan 6th
Over the past few weeks, I’ve been actively developing some long-awaited TPC! Memory Usage features. The highlights of the latest release are listed below. I believe that these will help WordPress developers and administrators improve scalability and performance of their blogs and custom applications.
- Custom checkpoints allow administrators to measure memory usage anywhere a WordPress action is available.
- Optional file logging allows administrators to have an effective way of tracking memory usage.
- Improved Security Check, and listed additional variables in System Overview.
- Fixed various bugs (special thanks to those who have taken the time to report issues).
As we continue to improve TPC! Memory Usage and implement new features, we would love to hear your thoughts. Feel free to leave a message on the official TPC! Memory Usage page. As always, thank you for your continued support.
Download TPC! Memory Usage
10+ WordPress Functions Every Developer Should Know About
Nov 5th
add_action($tag, $function_to_add, $priority, $accepted_args)
do_action($tag, $arg)
add_action() attaches a function to a specific action, which is then triggered by a do_action() call somewhere during execution. This can be used to execute a group of functions using the $priority parameter to determine order (optional), and arguments can be passed through the $accepted_args parameter. Below are a few examples of how this is used in the WordPress platform:
- do_action(‘deleted_post’)
This is executed after a post or page is deleted, and post or page ID is passed as a parameter. This allows you add custom functionality whenever a post is deleted. For example, lets say you want to be notified every time a post is deleted. You can create a function to send the e-mail, and execute add_action(‘deleted_post’, ‘notify_when_deleted’, 10, $email). After that, when do_action(‘deleted_post’) is called, the notify_when_deleted() function will be called. - do_action(‘wp_head’)
The wp_head action is traditionally called within a theme’s header. If you wanted to create an SEO plugin, you could very easily add an action to wp_head to display meta tags. Read the rest of this entry »
jQuery Tablesorter helper function for WordPress
Nov 3rd
In one of my projects, I converted WordPress into a reporting engine, which is used at 20 car dealerships to track Internet sales. During development, I found that I was writing the same code over and over again for the jQuery Tablesorter plugin, which allows you to sort tables using a simple JavaScript call.
First, I would have to queue the script file, then add the appropriate JavaScript. To ensure the JavaScript was executed at the right time, I had to create a function to use it with add_action(). I found this to be tedious and unnecessary, and wrote a simple helper function to remedy this. The following function was added to /wp-admin/includes/template.php, but if you use it, it will most likely go in a plugin or theme include. This will prevent it from being overwritten during WordPress upgrades. Read the rest of this entry »
TPC! Memory Usage 0.4 for WordPress released!
Oct 4th
We just released TPC! Memory Usage 0.4, which in addition to providing memory usage monitoring, provides WordPress users with a detailed System Info screen within the WordPress administration panel. The system information screen includes information on web server, PHP, MySQL, and WordPress statuses and settings. A link has been provided from the dashboard widget for easy access. We also added additional information on the notification feature in the FAQ section on WordPress.org due to some confusion. Read the rest of this entry »
WordPress memory usage reduced from 14MB to 1.4MB
Sep 6th
About two weeks ago, I wrote a short article called eAccelerator reduces WordPress memory usage which outlined how I was able to reduce WP memory usage to 8MB. While looking into the Zend Framework, I came across Zend Optimizer again, which I hadn’t messed with in a while. I decided to install it on a whim. The results were unexpected…
| WordPress memory usage* | |
|---|---|
| Standard PHP installation | 14MB |
| eAccelerator | 8MB |
| eAccelerator & Zend Optimizer | 1.4MB |
| * WP memory usage recorded by TPC! Memory Usage | |
WordPress Security: Primer & Advanced Techniques
Sep 3rd
WordPress is the most widely used open source blogging software in the world. This didn’t happen overnight, and the developers over there have certainly earned their keep. With any web application, especially a heavily used one, there are security risks and precautions we must take. Without a security model and virtual barriers in place to protect us, it can be an all-out free-for-all for hackers. Read the rest of this entry »
How Zend Server CE breaks WordPress Permalinks and how to fix it
Aug 31st
Recently, I switched to Zend Server CE from a manually installed AMP package (Apache/MySQL/PHP) to make use of Zend’s lightweight environment and easy install package. In doing this, I found that it broke the permalinks associated with WordPress. Despite mod_rewrite being enabled, and the “Pretty Permalinks” code being in the .htaccess file, it still didn’t work.
To fix this problem do the following:
- Open up httpd.conf. (On Windows, the default location of this file is C:\Program Files\Zend\Apache2\conf\.)
- Find the line with <Directory />.
- Make sure +FollowSymLinks is present on the Options line. (i.e. Options +FollowSymLinks)
- Change AllowOverride None to AllowOverride All.
- Restart Apache.
AllowOverride controls how .htaccess files are used. When AllowOverride is set to None, users cannot override the configurations set in httpd.conf for particular directories. While the .htaccess in this client’s WordPress directory was correct, Apache wasn’t allowing it to override the default settings as stated in httpd.conf. It is definitely worth it to learn more about how to configure Apache so that you can have a secure and well-performing environment, especially if a lot of developers work on the same production server.
If you have similar experience, we would love to hear what you have to say. Perhaps it will save someone else a minute or even a few hours.
25+ Must-Have Cheat Sheets for Web Developers
Aug 30th
Who wants to go to Google or break out the library of programming books every single time you get stuck on something? Below is a compilation of extremely useful cheat sheets, which can be printed, laminated and placed nearby for easy reference while doing your web development and design. Everyone has moments where a function cannot be remembered, and that is where these cheat sheets can be lifesavers. Bookmark this page for an easy portal to all of the cheat sheets, or an individual page if you find it helpful. Please don’t hesitate to post any cheat sheets we neglected to include, for this is about sharing knowledge.
1. PHP
http://www.addedbytes.com/cheat-sheets/php-cheat-sheet/ Read the rest of this entry »
eAccelerator reduces WordPress memory usage
Aug 27th
In my quest to minimize the memory usage of our beloved blogging platform, WordPress, I came across eAccelerator. After using Zend Server, and experiencing the performance boost their caching mechanism created, I started looking for something that would work easily with cPanel/WHM. Lo and behold, there exists a program called eAccelerator which is quoted as being “a free open source PHP accelerator, optimizer, and dynamic content cache.”
eAccelerator in EasyApache (Go to WHM > Click EasyApache under Software > Choose eAccelerator in the Short or Exhaustive Options screen)
Immediately, I saw the average WordPress memory usage go from 14MB to less than 8MB. That is roughly 57% percent of the original memory usage. Needless to say, I was quite pleased with the results!
Thoughts: In other languages, such as C# and Java, one has the ability to introduce libraries as needed without the extra burden of loading every last file, like in WordPress. Would it be possible to come up with a custom autoload function to do the same sort of thing? I believe Joomla uses a similar idea with the jimport() function.


