WordPress Performance: Why My Site Is So Much Faster Than Yours
People everywhere complain that WordPress is slow, or that they can’t survive a digg. They die if they get more than 10,000 visitors a day, their hosting providers ban them for using too many resources, and they cry because they have to purchase expensive hosting plans. If this describes your plight, before you run over to Survive Digg hosting and plunk down even more money, take a look at your WordPress setup and LAMP stack. You can make them better.
My Hardware
I’m not running on a top-of-the-line multi-processor machine with 16 GB of RAM per node. I have a Pentium 4 with 1M L1 cache, 1 GB of RAM, a 160GB SATA2 drive, and 100MB/s ethernet. I get 1.3 TB of bandwidth of month, as well. The hardware is from Cari.net and I pay $80 a month for it.
WP Built-in Object Cache
Did you know WordPress will try and cache all kinds of database queries as files on disk? It’s so simple. Just add the following to your wp-config.php:
// Enable the WordPress Object Cache: define(ENABLE_CACHE, true);
This can give a noticeable and immediate performance benefit. Less queries = less overhead and more CPU to go do other things. In case you don’t believe me, I just had a guy whose load average was between 20 and 50. After making this tiny change, it dropped to 2.
WP-Cache
You’ve seen this before, but if you’re not using the WP-Cache WP Super Cache plugin, we shouldn’t talk. It serializes your posts to a file on disk and later spits them back. It’s the classic caching solution. It also knows how to update itself when comments are received, etc, so your site is always the most up to date. Currently 304 posts are cached on this site in the last hour.
WordPress Plugins
Here is the complete list of plugins that run on this blog:
Content Filters: Adbright BritePic Enabler, Admin Info, Adsense Injection,Auto-hyperlink URLs, Feedburner Feed Replacement, Terms2tags, WordPress Duplicate Content Cure, WPvideo, WP Fixed Size, WP Adsense, WP-Stats, wp-cache
New Functions: delicious – Bookmark this!, Elliott’s Asides, Elliott’s Feed Tagger, Google Sitemaps, PJW Mime Config, Plugins Used, Relative Dates
Remote Services: Akismet, Extract Terms, Get RSS, Text Link Ads, WordPress From/Where
As you can see, there are just five that have any kind of processing impact. Akismet has to make calls to their webservice to verify spam. Extract Terms uses the Yahoo API to build keywords for automatic tagging. Get RSS performs similar operations per post. Text Link Ads keeps track of an xml file it updates every now and then. WP From/Where archives the keywords used to find every post. The first four cache their results. WP From/Where is the only “expensive” plugin I have, since it adds a query to every page load.
You should go through your plugins, and see if there’s a way to make them faster. To make them stop creating queries and use flat files, or better yet, cache things. If your plugins are slowing down your WordPress installation, fix them and submit a patch their author. He’ll probably even give you a free link.
You can install something like xDebug to profile your PHP code for bottlenecks, as well.
MySQL Query Cache
The MySQL Query Cache saves results of queries in case the query comes by again. However, it only knows how to save the byte-text of queries, not their compiled versions, so small changes to the query will create different cache entries. Turn this on if you don’t have unique ids in every query. You can enable it by adding the following to /etc/my.cnf:
query_cache_type = 1 query_cache_size = 26214400
This will turn on the query cache and instruct it to use 26M of RAM. After you’ve changed the config, restart the MySQL process by /etc/init.d/mysqld restart and then run these SQL queries to verify that it’s working properly:
SHOW STATUS LIKE 'Qcache%'; SHOW STATUS LIKE 'Questions%'; Qcache_free_blocks 2960 Qcache_free_memory 11693192 Qcache_hits 10433610 Qcache_inserts 5221850 Qcache_lowmem_prunes 2113131 Qcache_not_cached 1335038 Qcache_queries_in_cache 8765 Qcache_total_blocks 20976 Questions 21338215
When I check, I find the Query Cache efficiency is at worst 10433610/21338215, or 49%. That’s not bad.
PHP Opcode Cache
Why recompile our scripts every time, when we can save the bytecode? I use eAccelerator v0.9.5 to accelerate my PHP classes, currently of which 455 are saved. To install it follow these simple steps:
cd eaccelerator-0.9.5 phpize ./configure gmake (or make) gmake install (or make install) add extension="eaccelerator.so" to your php.ini file add eaccelerator.cache_dir="/tmp/eaccelerator" to your php.ini file mkdir /tmp/eaccelerator chmod 0777 /tmp/eaccelerator
Their wiki has very clear instructions for how to install it. This extension is a win-win. It uses a bit of disk space, but it also optimizes the opcodes and saves you from having to recompile a script every time. It can shave up to 5000ms off your loading time, depending how bad the php code you’re actually running is. For me, it saves about 650ms per page.
Apache httpd.conf
First, and perhaps most importantly, comment out any modules you’re not using. Loading them takes time and memory. Your apache config file is usually located in /etc/httpd/conf/httpd.conf. Some settings to keep in mind:
# Timeout and Keepalive Timeout 30 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 6 #Maximum Client Connections <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 512 MaxClients 512 MaxRequestsPerChild 4000 </IfModule>
There are tons of how to guides out there for configuring apache to maximize performance, but mostly it’s great software that doesn’t need much tuning.
PHP php.ini
PHP is a beast with all kinds of horrible modules it thinks it needs to load. You find the php configuration usually at /etc/php.ini; here are some settings to observe:
;*Hide our info expose_php = Off ;*Turn off for performance register_globals = Off register_long_arrays = Off register_argc_argv = Off magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off ;*Allow PHP to accept large data post_max_size = 6M file_uploads = On upload_max_filesize = 6M
The real trick is to disable as many extensions as you aren’t using to save memory. You can check out this guide for more information about optimizing a php configuration.
Linux Kernel
Let’s put it this way; you want to be running the latest and greatest versions of all your software. If you’re using a 2.4 Kernel, don’t. The 2.6 kernel is appreciably faster. For me, getting the latest software is as easy as running the yum update command, as I use FC5. If you’re on a different distro, check their documentation for instructions on how to update to the latest version:
[root@fc435152 ~]# yum update Loading "installonlyn" plugin Loading "skip-broken" plugin Setting up Update Process Setting up repositories livna 100% |=========================| 951 B 00:00 atomic 100% |=========================| 951 B 00:00 psa-8.1 100% |=========================| 951 B 00:00 updates 100% |=========================| 1.2 kB 00:00 core 100% |=========================| 1.1 kB 00:00 mono 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Dependencies Resolved ================================== Package Arch Version Repository Size ================================== Installing: kernel i686 2.6.20-1.2312.fc5 updates 15 M kernel-smp i686 2.6.20-1.2312.fc5 updates 16 M kernel-smp-devel i686 2.6.20-1.2312.fc5 updates 4.6 M Updating: alsa-lib i386 1.0.14-0.1.rc1.fc5 updates 404 k cups i386 1:1.2.8-1.fc5 updates 2.9 M cups-libs i386 1:1.2.8-1.fc5 updates 180 k dhcdbd i386 1.15-2.FC5 updates 68 k gnupg i386 1.4.7-4.1 updates 1.9 M gpm i386 1.20.1-82.fc5 updates 185 k krb5-devel i386 1.4.3-5.4 updates 954 k krb5-libs i386 1.4.3-5.4 updates 558 k krb5-workstation i386 1.4.3-5.4 updates 858 k libX11 i386 1.0.0-4.fc5 updates 761 k libXfont i386 1.2.8-1.fc5 updates 227 k libpcap i386 14:0.9.4-4.fc5 updates 207 k openssh i386 4.3p2-4.12.fc5 updates 279 k openssh-clients i386 4.3p2-4.12.fc5 updates 435 k openssh-server i386 4.3p2-4.12.fc5 updates 251 k samba i386 3.0.24-4.fc5 updates 16 M samba-client i386 3.0.24-4.fc5 updates 4.2 M samba-common i386 3.0.24-4.fc5 updates 8.5 M tcpdump i386 14:3.9.4-4.fc5 updates 443 k tzdata noarch 2007d-1.fc5 updates 451 k Removing: kernel i686 2.6.17-1.2142_FC4 installed 38 M kernel-smp i686 2.6.17-1.2142_FC4 installed 44 M kernel-smp-devel i686 2.6.17-1.2142_FC4 installed 13 M Transaction Summary ================================= Install 3 Package(s) Update 20 Package(s) Remove 3 Package(s) Total download size: 75 M
Architecture
If you’re serving more than 5 million hits a day, you’ll want to take a different approach than if you’re serving 500,000 hits a day. For a small server, like mine, which can handle up to perhaps 1,000,000 hits a day, you’ll want everything running on the same box:

For a more complicated server, you’ll split off the MYSQL component onto a hefty box, with Apache/PHP instances on a cluster of loadbalanced other boxes:

Conclusion
There’s no good reason for WordPress or your site to be slow, except your own negligence. Cache everything. Monitor performance. Use the latest versions of your software. Configure it intelligently. If you take an active part in every bit of software that powers your site, soon you’ll find things fit together more smoothly than before, and the secrets of a fast server will naturally fall into place.
Other Resources
Call me Lorelle; I’m going to link every other optimization guide for WordPress I can find:
- Optimize WP Loading Times
- Optimize your database
- How To: Optimize Your CSS Even More
- Optimizing WordPress Performance
- Optimizing WordPress for High Volume Traffic
- High Performance WordPress
- Optimizing WordPress and LAMP to survive the Digg effect
- Diggproof & Speed up Your WordPress Blog
- DiggProof your WordPress
- WP 2.1 Is Faster Than 2.0
- Summer of Code 2007 Performance Testing Project
Related Posts
| This entry was posted on Sunday, April 15th, 2007 at 8:25 pm and is tagged with . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback. |
This article would need some refresh anyway, if it can helps anyone here is another article :
www.yoorshop.fr/knowledgebase/115/Can-I-customize-my-phpini-.html
Also check out the GTMetrix as it will run your site through YSlow and Google Page Speed and return recommendations for speeding up your site.
There is a nice plugin that covers almost all the points here and also brings some other optimization methods to the table. It’s extremly user friedly and you don’t have to know much to may it work. codecanyon.net/item/performance-optimizer-plugin-for-wordpress/2413770
Hi, I was wondering if you could post an update on this article… you site is crazy fast!
I agree that most of these apply to dedicated servers, I host some sites on my server which is also shared with a few other people. There are limitations to what I can do, but then again I can do more with my server than if you were to get your hosting from a normal hosting service.
Also the I beleive the best way to keep a site in good condition is to simply spend a little time ironing out the issues you have as well as being careful about what you add to the site, You should ask yourself, do you need it and does the added weight benefit you more than the not having it.
I have a variety of techniques aimed at wordpress sites on shared hosting, perhaps you could take a look and see what you think diywordpressblog.com/
Regards Matthew
Great article, however, most of these apply only when you are using a dedicated server machine. You can only go to a certain extent on a shared hosting. I have used the caching option in wp config and there is slight improvement. I have asked my hosting provider for wp accelerator. It would be great if similar article can be reproduced specifically for shared hosting users (who mostly are not so technically sound :))
Nice, but quite an old article now.
New generations technologies go further : blog.brigato.fr/2011/12/24/wordpress-performance-guide-from-5-to-6100-requestssec-on-a-1vcpu1gb-ram-vps/
Elliott – if you’re going to use cache engines to speed up content delivery, never forget to tmpfs the cache directory. It will speed up the delivery significantly!
Some great hints here – now that were able to publish our content up to our load balanced wordpress servers, I’ve been looking to see how I can improve the speed of our site! Thanks.
Which of these does WP Super Cache take care of and which do I still need to install?
If you have WordPress performance problems, you should try out New Relic — www.newrelic.com – we just released an agent that let’s you see inside your wordpress app and see what’s slow. We’d love your feedback. Check out how we do it: blog.newrelic.com/2010/12/16/measuring-wordpress-performance-with-new-relic-rpm/
It is super easy to setup.
[…] at WebFaction, it was stupidly easy to set up. I also read some great articles, including this one, about performance considerations and […]
Good tips.
Always a good idea to run expensive operations once and then re-use the results as many times as possible.
Static HTML runs a lot faster than PHP so one of the caching systems such as WP Super Cache or W3 Total Cache are well worth using. Setting future expiry headers on CSS, JS, Images and so on to enable browser caching is also worth doing as well as using static files for errors e.g 404 instead of letting WordPress deliver them.
I had a recent issue which I have outlined in my own performance tuning article > blog.strictly-software.com/2010/10/wordpress-survival-guide-part-2.html
which meant that high loads caused by twitter rushes ate up all my available resources very quickly causing high virtual memory and I/O due to the disk activity swapping real memory for virutal memory. This was caused by my MaxClients setting in the Apache config file being set way to high (256) for my 1GB RAM Virtual Server.
Re-setting this value down to 20-30 has meant that when I next get rushes of Twitter traffic the Apache processes are queued up rather than all running concurrently eating up all my RAM.
I also created the following plugin for WordPress to keep me informed of when my system was having problems which I have found invaluable during this period of bug hunting >> wordpress.org/extend/plugins/strictly-system-check/
It will report on the current server and DB load, number of slow queries and aborted connections as well as testing that your homepage is still available and it can also be set to run some DB tuning such as REPAIR and OPTIMIZE.
Thanks for the article.
Rob
[…] […]
My is faster because I am using this plugin with other plugin mentioned in one post: wordpress.org/extend/plugins/performance-optimization-order-styles-and-javascript/
Great Article. I am facing slow speed of my blog. now i will try to resolve it. Thanks for sharing
Thank you for these useful tips!
Definitely worth trying.
I now use the DB Cache Reloaded plugin which really improved my response time.
Try it yourself here: wordpress.org/extend/plugins/db-cache-reloaded/
Jamy
Great post, I def. need to optimize my site better.
WordPress Performance: Why My Site Is So Much Faster Than Yours — Elliott C. Back…
この記事は以下サイトで紹介されています。 WordPressハッカーズ…
thank you so much…..
This all sounds like great advice. You know way more than I do, so I wouldn’t know the difference. But YSlow gives this page a grade of “E” – thoughts on that?
[…] PHP.INI File – Optimizing your PHP configuration file can improve the performance of your site. ElliotBack.com has some suggestions about what changes you might want to make to your configuration file, which will disable some […]
[…] up your wordpress blog: elliottback.com/wp/why-my-wordpress-site-is-so-much-faster-than-yours/ […]
While MySQL query cache takes care of the cache, it’s important not to overload MySQL with queries in the first place – devs should take care of it.
You can use WP MySQL profiler ( topsy.com/tb/wpsplash.com/mysql-profiler-plugin-for-wordpress/ ) to find any functions creating slow queries.
[…] many images or any of that, so I knew it had to be all those pointless database queries (see here, here and here for […]
Thank you for the great technical guide.
I have a couple of wordpress plugins that require me to use WP-Super-Cache in Half-on mode, because the “Super Cache” cashes too much of the content for those plugins to operate. (And legacy cacheing does not.
Can you recommend the best settings for my overall wordpress cacheing using a Shared Host with this “Half-On” limitation?
Thanks in advance, and here is a very interesting Optimization guide not on your list:
yoast.com/articles/wordpress-seo/
I realize it is mostly SEO optimization, but there are a few nuggets in it for this too.
Cheers,
Luke
Thanks so much!! The eaccelerator is amazing! My home page went from 12-14 seconds to load to 1.5! Similarly for my 2nd heaviest page.
Wow, After banging my head on a brick wall, I tried 3 of your suggestions and my sql cpu load went from 130% to 50%. Thanks for your great help. A lot of opinions on the net from faux experts and very little that works.
HII prend,, nice post is in your blog..
i’m from indonesia..
may i to exchange link with u..??
contact me or visit my blog ..
thankzz
You read my mind when you said “People everywhere complain that WordPress is slow”.
I’ve been disappointed at the page load times that Google Webmaster tools is showing me. Especially compared to my plain old html sites!
Most of your info is for PHP gurus, but I will add the “WP Super Cache plugin” and will take another read through the rest of your suggestions.
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours […]
Hi.. i tried to do this “WP Built-in Object Cache”, but the system brake down… where should i put it? thanks a lot..
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours […]
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours – This post is worth reading if you want to go even deeper into the details of optimization. It covers things you can do with regards to MySQL Query Cache, PHP Opcode Cache, Apache httpd.conf, PHP php.ini and Linux Kernel. […]
[…] Utiliza un servidor web rápido como nginx para servir contenido estático (es decir, imágenes), mientras que utilizas otro servidor para el contenido dinámico, que es otro truco que se suele usar. Nota 1: Más recursos interesantes. Optimización del tiempo de carga de página y una serie de tutoriales sobre la mejora del rendimiento web. Nota 2: Puede encontrar más consejos y trucos en el sitio de Elliot’s Back […]
[…] Utiliza un servidor web rápido como nginx para servir contenido estático (es decir, imágenes), mientras que utilizas otro servidor para el contenido dinámico, que es otro truco que se suele usar. Nota 1: Más recursos interesantes. Optimización del tiempo de carga de página y una serie de tutoriales sobre la mejora del rendimiento web. Nota 2: Puede encontrar más consejos y trucos en el sitio de Elliot’s Back […]
WOW. I feel really stupid. Thank you for exponentially speeding up my SNAIL of a WordPress site! Just enabling the built-in cache, installing the WP Super Cache plugin as well as the WP Widgets Cache plugin exponentially increased the speed of my site. I really appreciate this! Thanks!
[…] #5: You can find even more tips&tricks on Elliot Back’s site (and he plays DOTA too, how cool is […]
great article..thanks for info, Implemented a few things.. seems to work
very nice article..Thanks for the great post! and I look forward to reading more.
[…] using this guide, I allowed caching of database queries which just requires an addition to the […]
2 THINGS:
1) Please don’t tell people to edit the WordPress engine. That messes otber stuff up. Instead, make a plugin.
2) Could you test the difference in performance? That would make this post much more interesting.
[…] a few quick Google searches, I found this article. The author details several of the tools needed to improve WordPress performance, but the one in […]
[…] #5: You can find even more tips&tricks on Elliot Backs site (and he plays DOTA too, how cool is […]
Nice.
This should be required reading for all those who are whinging about their site performance. Not least of all to us.
[…] own negligence. Cache everything. Monitor performance. Use the latest versions of your software. Configure it intelligently. If you take an active part in every bit of software that powers your site, soon youll find […]
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours […]
This is one of the pages I used as I got started with my new hosting environment. I settled on nginx as the web server, APC OpCode cache, and rather than use the WP-SuperCache plugin, I stuck Varnish in front of the whole works.
Thanks for the great post! and I look forward to reading more.
[…] #5: You can find even more tips&tricks on Elliot Back’s site (and he plays DOTA too, how cool is […]
Nice. Implemented a few things.. seems to work. Thanks for the article
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours […]
How strange that you advocate load balancing. Word press does not work properly behind a load balancer, even the WP guys own up to this. wordpress.com uses a different codebase.
[…] Dit weblog geeft aan dat er veel cacheable is en dat dat de website aanzienlijk kan versnellen […]
Very cool tricks! Thanks for sharing.
Sorry, but you have 22 external Javascript files and 16 CSS background images. Try to use css sprites, css cacheer and maybe phpspeedy to reduce your HTTP requests. You got an F Grade from ySlow. Hmmmm….
Nice info. As always I suggest testing the performance and benchmarking when all is set-up.
[…] #5: You can find even more tips&tricks on Elliot Back’s site (and he plays DOTA too, how cool is […]
[…] #5: You can find even more tips&tricks on Elliot Back’s site (and he plays DOTA too, how cool is […]
[…] #5: You can find even more tips&tricks on Elliot Back’s site (and he plays DOTA too, how cool is […]
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours, April, 2007 […]
[…] #5: You can find even more tips&tricks on Elliot Back’s site (and he plays DOTA too, how cool is […]
nice article, besides the db caching you list, I've found great success using Xcache with PHP5, running on the nginx webserver and multiple fastcgi processes on Debian. I don't get that much traffic, so right now I'm still hosted on a home dsl line – but I have a number of sites all chewing off the same stack.
I used to run varnish as a reverse proxy, but with nginx and it's ability to auto cache images, I've dropped it for now, but I recommend you checkout varnish if you have a busier site.
Oh, and one more thing, I've started to use Flickr as my CDN for images, I only have a couple on there, but I know the more I offload, the less will have to squeeze out via my 2 copper wires!
[…] Dans la suite de l’article, je m’arrêterai à l’optimisation de WordPress et de son environnement (thème, plugins, …). Pour l’optimisation d’une plateforme d’hébergement complète, vous pouvez consulter l’article de Elliott C. Back […]
I’ve been reading your blog for a while now, and just now made the connection of yours to cari.net. They’re my current employer, *cof cof*
[…] For more tips on how to improve your WordPress performance, check out WordPress Performance: Why My Site Is So Much Faster Than Yours. Another interesting WP caching plugin is Batcache, which uses the memcached backend to serve requests out of a cluster of machines’ RAM memory. […]
Hi there,
I found this rather late, but it saved my page. I struggled getting my wp log working on my rather slow firewall-server-mail-web-thingy. I applied almost all your tweaks and it speaded up my site tremendously. In fact, it stopped my httpd from crashing every time i loaded more than one admin page at the same time. wkossen.nl/weblog/ still won’t live through a digg frontpage episode though… (it’s a alix amd geode 256MB embedded little box with centos 5, so slow by nature..)
In fact, the most effective change was from eAccellerator php plugin. that made THE difference….
Cheers!
Willem Kossen
Nice! Will try this out
To turn off all needless apache modules, you will have to go to the /etc/httpd/conf.d/ directory also and rename module files like: squid.conf to squid.off or ssl.conf to ssl.off This way, httpd will not include this modules during startup.
Hi elliot can you otimize my server for me please? i’ll pay of course, please contact me via the email i provided here thanks.
Hi, Do you still recommend Cari.net ? I’ve heard of several people having problems with them. I am about to switch from my previous hosting company Eapps. BTW I recommend Eapps, but I am switching because I need a dedicated server and Cari.net prices are far more cheap than Eapps… almost 90 times more cheap for what I need.
So, if you were about to switch from another hosting company, would you switch to cari.net?
thanks!
Thank you
Check out the recently launched WP-Offload plugin. You will see a dramatical speedup especially if your posts have a lot of static content (images, documents, movies, etc.). It will completely redirect all the requests for static content to external cache servers, so the load on your web server will decrease significantly.
This give me a lot of stuff to go over. My site is fine most of the time & some times VERY slow. I am on shared hosting and my site is getting only a few hundred hits a day. I am ready to migrate to my own server…..GRRR headaches.
[…] Google Gruppe om webhoteller Et lille Servage.net trick WordPress performance tricks Posted in Teknik | Leave a Comment […]
[…] People everywhere complain that WordPress is slow, or that they can ’t survive a digg. They die if they get more than 10,000 visitors a day, their hosting providers ban them for using too many resources, and they cry because they have to purchase expensive hosting plans. If this describes your plight, before you run over to Survive Digg hosting andread more | digg story […]
Nice graphics / pictures!
Which software did you use?
Greetings,
Lu
[…] For more advanced methods of caching and speed improvement, visit Elliot Back’s “WordPress Improvement: Why My Site Is So Much Faster Than Yours” […]
Another big gain is to switch from Apache/mod_php to nginx+fastcgi.
It’s smaller, and more free RAM means a couple extra php processes, should you so desire, plus the inherent speed boost you get from using nginx.
In a (wholly unscientific and useless) benchmark, using nginx with 3 php fastcgi processes, eaccelerator, wp-cache, a properly tuned mysql, etc.
/usr/sbin/ab -n 10000 -c 64 host.name/
… gives back ~1500 requests a second at around 525mbit/s total transfer… which puts the limiting factor squarely on my network card.
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours by Elliott C. Back (tags: wordpress performance optimization) […]
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours by Elliott C. Back (tags: wordpress performance optimization) […]
[…] According to these numbers, my dual core server can do 750 requests per second, fulfilling each within about 150ms each. That’s pretty fast, probably because I know the secrets of WordPress Optimization. If you make every layer as fast as it can be, and cache heavily, you too can see lightening fast WordPress installations! zeus technology ltd, adam twiss, apache http server, apache software foundation, apache installation, concurrency level, document length, concurrent requests, suitable answer, server hostname, document path, apache 2, server port, man page, server software, benchmark, wordpress, wp, bench, and methodology […]
[…] People everywhere complain that WordPress is slow, or that they can ’t survive a digg. They die if they get more than 10,000 visitors a day, their hosting providers ban them for using too many resources, and they cry because they have to purchase expensive hosting plans. If this describes your plight, before you run over to Survive Digg hosting andread more | digg story […]
[…] read more | digg story […]
[…] read more | digg story […]
[…] People everywhere complain that WordPress is slow, or that they can ’t survive a digg. They die if they get more than 10,000 visitors a day, their hosting providers ban them for using too many resources, and they cry because they have to purchase expensive hosting plans. If this describes your plight, before you run over to Survive Digg hosting andread more | digg story […]
Nice ideas and tips. You didn’t mention moving to CDN service all static content. It provides extra performance (lowers your server load), thus you can serve more web visitors with easy.
That’s:
// Enable the WordPress Object Cache:
define(‘ENABLE_CACHE’, true);
It needs quotes around ENABLE_CACHE.
[…] People everywhere complain that WordPress is slow, or that they can ’t survive a digg. They die if they get more than 10,000 visitors a day, their hosting providers ban them for using too many resources, and they cry because they have to purchase expensive hosting plans. If this describes your plight, before you run over to Survive Digg hosting andread more | digg story Mac vs. PC: How Would Linux Fit? » Sorry, no comments yet. […]
[…] Mr. Back has some other suggestions at his blog which may be helpful for the WordPress BlogMaster — take a look, in particlular at his “PHP OpCode Cache” technique at that link. Note that I could have classified this under “WordPress Issues”, but the idea of looking at a cache fix using PHP is generic enough, and probably will work across a range of applications, that I have included it here. […]
Hi,
Thanks for writing this article, because I have the same performance trouble and now I have installed wp-cache plugin. Glad find your articles from google…
Cheers…
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours by Elliott C. Back […]
[…] This object cache supposedly caches database queries to disk to reduce CPU and database overhead. This should increase performance in most cases unless your disk I/O performance is very poor, like Dreamhost’s NFS storage system. This feature seems to be undocumented and had security issues in the past, but is commonly recommended as a safe way of increasing performance. I have heard that the object cache hardly improves performance, but I’d never imagined that it would slow my site down by 10x or more. […]
[…] Mr. Back has some other suggestions at his blog which may be helpful for the WordPress BlogMaster — take a look, in particlular at his “PHP OpCode Cache” technique at that link. Note that I could have classified this under “WordPress Issues”, but the idea of looking at a cache fix using PHP is generic, and probably will work across a range of applications and Content Management Systems. […]
[…] read more | digg story […]
[…] People everywhere complain that WordPress is slow, or that they can ’t survive a digg. They die if they get more than 10,000 visitors a day, their hosting providers ban them for using too many resources, and they cry because they have to purchase expensive hosting plans. If this describes your plight, before you run over to Survive Digg hosting andread more | digg story […]
[…] WP Built-in Object Cache […]
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours by Elliott C. Back Nette Zusammenfassung. […]
[…] read more | digg story […]
[…] But, I implemented some of the great tips from this blog – notably installing the wp-cache plugin for WordPress, enabling caching in MySQL, and disabling some additional PHP options (although I doubt this last thing has any significant impact). […]
Nice Site!
[…] Maximize your server architecture.The amount of traffic your blog gets can determine the best way to set up your server. For some, it may be better to run everything on one box, but for others, splitting up the components into different boxes can speed things up. […]
[…] If you would like some more advice on how to optimise your blog, check out these post: 6 ways to speed up your blog Why my wordpress site is so much faster than yours […]
[…] WP Built-in Object Cache […]
[…] WordPress Performance: Why My Site Is So Much Faster Than Yours by Elliott Back – There?s no good reason for WordPress or your site to be slow, except your own negligence. Cache everything. Monitor performance […]
Thanks for the tutorial
@GrandMaster — the easiest way which will decrease your server’s load most (I assume you;re running WordPress / similar cms) is to install an edge server / reverse proxy solution.
An easy to follow tutorial regarding this can be read here.
It constantly amazes me how people keep on prescribing the hardest way with minimum return to be done first.
Squid (and other edge server solution) are easy to implement, takes only minutes, and easily drop a double digit server load to a single digit.
Yes, you may not be able to do this on a shared webhosting environment; but so does many of the tips mentioned in this article.
Hope it helps.
Top wordpress tools of the month…
WordPress is the phenomenon (yeah I do believe it is one) that made a lot of dreams come true. It created a bridge between people without any kind of programming knowledge and the fact of being live and writing for people. The road is so much shorter f…
Another blog i run has been having severe load issues, and its something i have struggled to understand – i set up the cache and it caches pages but how does it deal with new comments ? Does it recreate the cached pages each time a new comment is posted? I ask becasue i have threads that can generate close to 600 comments in about 5 hours on a particular article _ does any one know where i can find this kind of information ?
Or is the article cached and the comments dynamic or do i need to re do my theme to fit this kind of functionality in
Yes, but you’re from Guam. That might be the first problem. 24/7 monitoring in place shows that this page is loaded in entirety on an average of about 1.5 seconds. Then the images all come in, which takes more time.
This page was slow to load for me.
Thank you sir. I will optimize my wordpress now.
YES! But memcached is pretty hardcore
Take a look at this article or the svn package.
Is there anyway to implement memcached with wordpress?
Bookmarked …
This is great. We’re not quite there yet with tektag.com, but I’m bookmarking this for when the day comes.
Thanks,
Tim
Whoops, mis spelled the blog site!
techcx.blogspot.com
Thanks Mark! I really needed techcx.blospot.com!
Keep on blogging!
Thanks a lot for the useful hacks . I was trying to avoid digg because I didn’t want to over run my shared server but with this help I shouldn’t have to worry about digg crashing anymore.
Great info Elliott. A few days late for me since I use WordPress for my site and felt the pain when I made the digg front page on Sunday for the first time. I went down for a little but with the help of my host was able to debug a bad plugin and quickly installed WP-Cache and was back up running fine after that. I can appreciate the fact that you are very lean on plugins. You also offer some great tuning and load balancing tips here. I’m sure other fellow WordPress users appreciate this.
Welcome to the DIGITAL age, mr. bussh.
I’ve got + worker_connections 10240
;-))), and I need them!
serving more than 7 million hits a day
Thanks for the great post. I’m going to implement most of your suggestions as soon as I can.
I tend to like WP-Cache until it decides to give me some problems. Now, I decided to do without it.
Let’s see how’s is your wordpress performance(almost 1000 digg). Good to share
so i guess i shudnt think about migrating to movabletype …
but i’ve heard so much about mavabletype being the holy grail of blogging software …
guess i’ve heard wrong … hehe …
GNC-2007-04-17 #259…
Really wild show I actually recorded the podcast while at the same time having a live stream with people watching the show. It was really weird yet distracting at the same time. I will have a link to the video…….
ah, how painful it must be to have so many hits! =P
No, they’re live really!
cached!
I just wanted to see if the comments were live and not just permanentally cached.
nginx that is.
btw, Bush took red suicide pill ;-)))
I rely on gninx:
advertisement:
Capitalists: we will make tofu from your balls:
www.google.com/alerts
Search terms: Bush took suicide pill
Type: News
How often: as-it-happens
Your e-mail:
Create alert
*************************Be the FIRST to know!*************************
yeah I left wordpress a while ago
Cool article though!
Great article Elliott.
Good post! I always find it amazing the people’s solution to any problem is more. Looking at what your doing, and making sure you’re getting the most from any system is vital
I had some problems with WP-Cache as it was not showing the comment form on articles for registered users, if the page cache was triggered by a un-registered one. So you might wanna be aware of that….
WordPress plagued me too for a while.
After that, I just quit.
I go to Tech CX alot now.
www.techcx.blogspot.com
I wrote a plug-in a while back that provides some additional insurance against a digging/slashdotting, etc. It allows you to automatically utilize the Coral Content Distribution Network for readers that come from specified domains.
theblogthatnoonereads.tunasoft.com/coralize/
Nice article.. Gives me something to think about for future WP installations.
Hooray! A front-page “how to survive digg” article that actually loads!
dugg!
Thanks for the link to my article. Here comes the hordes, hope it stays up!
test test test test
Nice article, this should help me since I have 3 servers now because of load problems but now maybe I can follow some of your PHP hacks!
Great article. Dugg — Thanks.