Contact: Web / Voice / Email / Tips
Simple Thoughts Blog - Java and Web Technologies

Simple solutions for complex problems.

 

5 Golden Tips For WordPress Performance Optimization / Slashdot-Digg Protection

April 12th, 2007 by Angsuman Chakraborty

WordPress is a popular blogging software. As a design decision it stores the blog content in database and uses php to fetch and display the pages. This consumes more resources (cpu and memory) than blogging softwares generating static pages. Here are 5 tried and tested power tips to reduce memory & cpu resources and speed up your wordpress based sites.

Speed up PHP code execution.
There are several php code accelerators available. I recommend eAccelerator based on performance and stability. Use it with at least 128MB RAM ( eaccelerator.shm_size = “128″ ). You will observe significant performance benefit from this. Note the average cpu utilization before and after.

Optimize MySQL server installation
MySQL on Linux get installed by default with minimal configuration which is suitable for low end machine. It doesn’t make use of the memory of your system you may have. There are several online guide to configure mysql for better memory utilization and overall optimum performance. I used the following settings:
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M

Read the fine manual for explanations on each of these settings :)

You may also want to enable slow query log and identify the slow queries. Progressively reduce the time as you better optimize the queries.

Slim & trim WordPress.
WordPress is supported by tons of free and paid plugins. However many of them are not optimized. The slow query log step above should help you to identify the slow queries. Search the plugin source code to identify the plugins responsible. Work, politely, with the authors to resolve the issue. If that doesn’t work, look for alternatives or disable the plugin. Plugins should be used in moderation. Prefer plugins for functionality rather than cool / wow factor. Many plugins imposes a significant cost in terms of resource and performance.

Staticize your pages.
wp-cache 2 is a WordPress plugin which will cache your page output in a file (download). For future requests of the same page it serves the content directly from the file thereby bypassing the need for database queires and further php code execution. It recognizes when any page content has changed. Unfortunately it then invalidates the whole cache instead of the page itself and other pages which are likely to change.

It will also invalidate the whole cache it a comment is added to any post. This is a problem for highly commented blogs. I had posted a solution to this problem: How To Improve Performance of Highly Commented WordPress Blogs.

At some point you still will have to move to a better server - from shared hosting to VPS (virtual private server) and then from VPS to dedicated server(s). And then you may have to use a caching reverse proxy server for load balancing between multiple apache servers. Trust me you will want to face this type of challenges for now in you are in the big league :)


Filed under Headline News, How To, Linux, Load Testing, Pro Blogging, Stress Testing, Technology, Web, Web 2.0, Web Hosting, Web Services, WordPress, WordPress Plugin | | RSS 2.0 | Trackback this Article | Email this Article

You may also like to read

»Digg Down?
»Digg Down...
»Improving Site Performance...
»Digg: Technologies Used & Challenges Faced
»WordPress 2.5 Due in 22 Years!
»Social Bookmarking is Back! Use It.
»How Translator Plugin Pro Improves Performance By Dual Caching
»Paid Content Plugin For WordPress New Version - Request for Suggestions
»For "WordPress Users Only" Section Started
»WordPress (Blogging Software) Version 2.1 Released
»Comment Guard Pro (WordPress Comment Spam Protection Plugin) Released for Internal Testing
»How To Improve Performance of Highly Commented WordPress Blogs
»Simple Thoughts Blog is now Slashdot Proof
»How To Increase Your WordPress Site Performance (Without Losing Functionality) by 10 Times
»PHP Performance with eAccelerator versus eAccelerator with PHP Zend Optimizer

Looking forward to hear your thoughts.



Please enter the code shown below ( to verify that you are human ) before you click Submit Comment.

No. 1 method to ethically increase your blog traffic and reach.

Translate

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanPřeložit do Čech/CzechOversætte hen til Dansk/DanishKääntää jotta Finnish/FinnishLefordít -hoz Magyar/HungarianÞýða til Íslenska/IcelandicTraducir a Latinoamericano Español/Latin American Spanishtagapagsalin sa Filipino/FilipinoTłumaczyć wobec Polski/PolishA traduce la spre Român/RomanianPrevesti za Srpski/Serbiantolmačiti v slovenski/SlovenianÖversätta till Svensk/SwedishChyfieitha at Cymraeg/Welshtercüme etmek -e doğru Türk/TurkishPrevesti to Hrvatski/CroatianПревеждам към Българин/BulgarianTraduzca al Español/SpanishTraduisez au Français/FrenchTraduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplifiedترجمة الى العربية/ArabicVertaal aan het Nederlands/DutchΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/Norwegian中文翻译/Chinese TraditionalTraduzir a Língua portuguesa brasileira/Brazilian PortugueseReddo ut Latin/Latin

Taragana Network

»Ctrl-S
»Enterprise Blog
»Free Book on Eye Care by Natural Therapy
»Health Care Blog
»Hot Computer Jobs Blog
»Pet Care & Grooming News and Tips
»Phil Law Blog
»Taragana - Software Outsourcing
»The Angsuman Chakraborty Blog
»The Diabetes Cure Blog
»The Eye Treatment Blog
»The Stem Cell Blog
»Weblog Hosting Blog
"Do not worry about your difficulties in Mathematics. I can assure you mine are still greater." - Albert Einstein