WordPress is one of the most widely used blogging platforms available and for good reason. A number of plug ins and themes exist that allow the user to create a highly specific experience for their audience.
However, there will come a time when your WordPress blog starts to feel bloated and slow. The following tips will help get your blog back to the smooth experience it needs to be for your readers.
Update and Clean Up
Inefficiency is a major culprit when it comes to poor performance in any software. Ensure you keep your WordPress installation and plug-ins up to date. Developers will often improve efficiency on their software as they continue to work on it and refine their approach. Do not have old plug-ins wasting valuable memory and bandwidth. Uninstall it if you are no longer using it or it ceases to be supported. There are plenty of other options out there. Be certain your plug-ins benefit the functionality of your blog.
Speeding Up php Execution
WordPress was created using a database retrieval of information method of display. The platform utilizes php to pull the requested information out of the database for display to the user. Thus, a php code accelerator, such as eAccelerator, can be used to significantly increase performance. eAccelerator is a good choice as it is stable with great performance. The minimum amount of RAM to assign with it is 128 MB (eaccelerator.shm_size=“128”).
Tweak MySQL Parameters
The default installation for MySQL utilizes minimized settings. The installation is set up to be useful even on low end systems. However, the minimum settings do not allow MySQL to use the fullest capability of the hardware available. Tweaking the settings can provide an improved experience. A number of performance guides on MySQL are available that can be consulted for greater scope than this article can provide. The following are but a handful of parameters and settings that can be adjusted for performance.
Create Static Pages With wp-cache 2
Wp-cache 2 is an incredibly useful WordPress plugin that will cache a page when it is requested. Future requests of the page are then drawn from the cache instead of the database being queried for the information with additional php execution. The only downside is its inability to alter content stored in the cache. If something changes in the database, the plug-in wipes the cache to rewrite the page. A blog that generates a lot of comments will not gain as great of a benefit from wp-cache 2 without some fixes implemented.
Improving WordPress Efficiency
There are a handful of tactics that can be used to increase the efficiency of the coding of a WordPress blog. These won’t necessarily shave off a huge amount of time. One should consider the number of times the code is actually executed for the given action and how much time is lost over the duration.
Instead of adding more code to improve functionality, integrate external scripts. Essentially, a command is added to the base code so when a visitor takes an action that would require that script, it will call and execute it. If a script is integrated directly into the code, 100 visitors would have it executing 100 times. However, by using an external script, only those visitors that specifically undertake the action requiring it would trigger it.
Utilize CSS Short-Hand
Coding has a lot of ins and outs, shortcuts and tricks. Many languages have shortcuts built in just to improve efficiency. Familiarize yourself with CSS short-hand to remove excess text from the actual piece of code. Sub-labels are typically a major contributor. They generally aren’t necessary but are included by the coder anyway.