Skip navigation

The 3 Easiest Ways to Speed Up WordPress

Lorelle's 2 Year Anniversary!By John Pozadzides (Apollo XVIII Astronaut.)

So, in the past 2 weeks I’ve had 3 articles hit the front page of Digg. Let me just tell you, the onslaught of traffic can bring a server to it’s knees. Over the last many months I’ve learned a thing or two about tweaking WordPress, and while this is not meant to be an exhaustive tutorial on how to survive a Digg, it will give you some tips that can definitely improve your blog’s performance for all of your visitors.

By the way, this mostly applys to stand alone WordPress installations, because the boys over at WordPress.com keep those sites buzzing on 300 dedicated, load-balanced servers. Barry Abrahamson and Matt Mullenweg gave a lecture all about it here.

There are three main things which will slow down your site for visitors:

  • Executing PHP commands
  • Pulling information from the database
  • Downloading graphics, javascript and other embedded elements

Remove Unnecessary PHP Executions and DB Access

Those wonderful themes that we all choose are often loaded with PHP bloat. Some theme’s such as my own Rapid Access were designed specifically for speed. But others are designed mainly for looks (I’m not going to name any names). But all of them have some very generic code in them to allow them to be easily installed on any blog.

This generic PHP code can be replaced with some static HTML in order to save CPU processing time and database queries, and under load this can make a big performance difference.

The way to fix this is quite simple. If you examine your theme’s Header.php file in your Presentation > Theme Editor tab in the control panel you will find some lines that look somewhat like the following:


<title><?php bloginfo('name'); ?> <?php bloginfo('description');?></title>
<link rel="shorcut icon" type="image/x-ico" href="&lt?php bloginfo('template_url'); ?>/favicon.jpg" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('stylesheet_url'); ?>"/>
<link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('template_url'); ?>/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />

Now, if you take a look at the bolded segments, that is the PHP code mixed in with the HTML. In this example, there are 5 different PHP commands which need to be executed every time the page loads, and they go and pull this information from the database based on what you entered into the blog’s options menu. Since we don’t need the theme to be portable to other blogs anymore, we can eliminate those 5 PHP executions and replace them with plain HTML which is about 20 times faster!

To do so, load your blog in a normal browser window and select “View Source”. You should then see the finished code that had the PHP processed and replaced. In the case of this example, the following were the finished result:


<title>One Man's Blog - Specialization is for Insects.</title>
<link rel="shorcut icon" type="image/x-ico" href="http://onemansblog.com/wp-content/themes/rapid-access/favicon.jpg" />
<link rel="stylesheet" type="text/css" media="screen" href="http://onemansblog.com/wp-content/themes/rapid-access/style.css"/>
<link rel="stylesheet" type="text/css" media="print" href="http://onemansblog.com/wp-content/themes/rapid-access/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS .92" href="http://onemansblog.com/feed/rss/" />

Now, all we need to do is replace that original PHP code with the already processed code and save the Header.php file. That’s it! You’ve saved yourself 5 PHP executions, and when a blog gets some heavy traffic that adds up very, very quickly. Try looking in the Footer.php file too because there is often content there that can be converted to HTML as well.

Others Areas For Attention

Rogue plugins can also be horrible for performance, even if they are not enabled. So if you have plugins installed but not activated – delete them from the plugins directory on the server. As long as they are there they have to be examined even if they are inactive.

Are you using a Digg, or other social media plugin to display statistics and allow voting? Why? You are putting load on your server for every page visit and Feedburner offers a much simpler solution that simply requires you to add a JavaScript which loads from their servers, thus speeding up your site. Sign up for a free Feedburner account, and then look for the FeedFlare option under the Publicize tab.

One other area people rarely think to examine is the sidebar. For example, do you have a fixed number of categories that hasn’t changed in a year? Why not remove the PHP used to generate those and replace them with a static HTML list instead?

And lets talk about those Google Reader and other RSS subscription icon plugins. You do not need to execute PHP commands on every page load to show one of those. Consider replacing those bloated plugins with static HTML subscription links. Again, you can simply take a look at the source code on your page to see the final HTML to use in your sidebar. Or if you need help just ask on the WordPress.org help forums, the HTMLHelp.com forums, the MyBlogLog User Group (if you are an MBL member) or even here in the comments.

Don’t stop there. The general rule of thumb is, if the content always displays the same, it should be converted to HTML since PHP is not needed. If you take all of this advice you should be able to remove 5-10 PHP commands from processing with every single page load. It will have a noticable effect on your site performance.

Trim Down Server Requests

Every single item on a page generates a seperate request to the web server. That would include the HTML page, the CSS page(s), javascripts, images, movies, and any other item.

A server can only handle a certain number of requests at a given time, so trimming down the number of items or off-loading content to a second server can dramatically improve performance. For example, if you are going to have a post with several images embedded in it, consider uploading those to an image sharing site like Flickr and then embedding them in your page. That way, when visitors come to your site the images are being served up by Flickr’s giant servers which can easily withstand the load.

The same thing applys to embedding of videos. In this day and age there is just no reason to host your own video. Upload it to YouTube, Google Video, Viddler or any other video hosting site and then use their embedding function to play back the video from their servers within your page.

The bottom line here is that if you have content you want to embed in your site, look for an external partner where you can upload the content and use their servers to absorb the load from within your page.

For more information on optimizing your site for performance see How to Survive a Good Slashdotting or DiGGing.

Now, get out there and make those WordPress site run faster! And don’t be ashamed to ask for help if you need it!


Lorelle’s pal John P. may not be the sharpest knife in the drawer, but at least he knows that school toilets are cleaner than water fountains!

83 Comments

  1. Posted September 22, 2007 at 4:28 am | Permalink

    Thank you very much for this article. I know very little about html and php. This helped a lot.

  2. Posted September 22, 2007 at 4:41 am | Permalink

    Holy Smokes batman! Viewing the source showed a lot of stuff I didn’t know was going on. I’m not brave enough to change it “all at one time” but going to try line by line … thanks!

  3. Posted September 22, 2007 at 5:12 am | Permalink

    This is a very useful post, like Jo I am going to slowly change bits to speed things up.

    My hint would be to specify width and height to images in the html to speed up loading.

  4. Posted September 22, 2007 at 7:57 am | Permalink

    Thanks for the tips. I, like most people, didn’t realize how php commands slowed down the site. Made those changes right away since, like you said, they don’t need to be dynamic. I can change my description in the header just as easily as I can in the options panel.

  5. Posted September 22, 2007 at 11:33 am | Permalink

    WOW! Nice! Ma blog is now really pimped! Thanx a lot! *both thumbs up*

  6. Posted September 22, 2007 at 11:37 am | Permalink

    the PHP title part, that one i must leave unaltered. because i have a certain title for the main page, but to post pages i have the post title as a title. basic SEO.

  7. Posted September 22, 2007 at 12:07 pm | Permalink

    I’ve used WordPress for a while, but found it took too long to load, so I recently switched to Tumblr. I still run a few WordPress Blogs, I’ll be trying out these strategies to speed up WordPress, and if it gets fast enough, I might switch back to WordPress.

    Keep up the great work

  8. Posted September 22, 2007 at 1:12 pm | Permalink

    I would strongly disagree with the suggestion to replace simple PHP template tags with static HTML, I believe it’s a case of premature optimization and won’t actually cause a noticeable difference in performance.

  9. Posted September 22, 2007 at 9:38 pm | Permalink

    I gotta agree with Matt here, removing minor PHP calls to things like “bloginfo” isn’t going to make it any faster. Not noticeably so. Your better bet is to look closer at the code being run and try to eliminate extra database work, not to eliminate these very minor bits of PHP.

    But, by far, the most performance enhancing thing you can do for any WordPress site is to install and configure WP-Cache correctly. This caches the entire page, resulting in no PHP being run at all, and no database queries. It’s smart enough to refresh the cache when the content changes, so it’s more or less transparent to the readers. If you are getting hit by links from a high traffic site, WP-Cache is virtually mandatory, as it will be serving static content at high speed instead of rebuilding your page every time.

  10. Posted September 22, 2007 at 10:57 pm | Permalink

    Actually, John is right, to a point, about the PHP database queries that can be replaced with static HTML. It isn’t a matter of “speed” as much as it is a matter of reducing the load on your database, especially when traffic spikes high. WP-Cache does a great job, but you can help it out by reducing the number of hits on your database, even if they are slight.

    When my site suffered from spikes and a bad web host, I had to put all my Pages and posts in static HTML links to cut back on the usage of the database. Yes, it killed future “optimization” and categorization, but at the moment, it was more important that my site stayed live than crash the database constantly. The most recent versions of WP-Cache wouldn’t work with the dated server software, so I’m glad to be done with them…soon.

    I certainly do not recommend such actions for the average user, but links to your blog’s URL doesn’t have to be a call to the database. Why bother? Save a little database action and set it to be fixed.

    For those with the technical ability to edit and tweak their WordPress Themes, you can do these things. That’s part of what makes the versatility of WordPress so wonderful.

  11. Posted September 23, 2007 at 7:57 am | Permalink

    Matt and Otto,

    I’m going to have to respectfully disagree strongly in return. :-)

    I should have stated up front that I’m working under the assumption that WP Cache is already installed and functioning. That alone however will NOT keep the server running under a front page digging. I have proven this on my own server no fewer than 4 times. The site crashes even on my big dual-processor, 2GB RAM, Raid HD linux server running eAccelerator and WP-Cache. (Granted, I’m running a lot of plugins and crap…)

    When Barry and Matt gave a lecture about improving WP performance, Barry compared WP Cache to WordPress without it, but I wish he had also run the comparisons against static HTML. However there is a nice comparison right here.

    Bottom line = a manually cached page (real HTML) is still about twice as fast as WP-Cache. I could also give many more examples of where and why this is true, but it is the single most effective way of surviving a Digging.

    Furthermore, I have witnessed first hand how removing minor PHP calls can make a signifigant performance improvement in terms of survivability. This is something everyone can do, and if they put in just a little work they can remove 10-15 PHP calls in most themes. We recently made these changes to a friend’s site in between front page appearances and the second and future events were far more workable with noticable performance improvements. Besides, there is absolutely no harm in making these changes.

    One has to consider the secondary effect of a Digging which is that people move from the page that is being viewed to other pages on your site (I see Diggers move on to around 400+ other articles per front page apperance). Those “minor” PHP calls, multiplied by the thousands eventually represent signifigant overhead – especially when the site is already under what is the equivalent of a DOS attack on the Dugg page, and when they all come at virtually the same time. The more PHP you can remove and replace with HTML, the faster the site will run. This is pure logic.

    Finally, we have to remember that people are running on a very wide variety of infrastructure out there. Some are on Windows machines which are already less effective than Linux boxes. Some people are on shared hosting plans, some on Virtual Private Servers (VPS), some on small dedicated servers, etc. Making the claim that WP Cache should handle 99% of the cases is simply not accurate and it does not take into consideration the fact that sometimes it is just a marginal difference between the server staying alive and dying.

    John

  12. Posted September 23, 2007 at 7:58 am | Permalink

    PS – It’s too bad that WP doesn’t natively thread comments. It makes it much harder to reply, and more difficult for people to follow along with specific discussions.

  13. Posted September 23, 2007 at 8:41 am | Permalink

    While reducing hits on the database makes sense, a better way to do that would be to enable the WordPress object cache instead. Just turn it on in the wp-config.php file. Then the results of those queries will be cached locally. You’ll not be hitting the database to get simple values from the wp_options table then, which is what most of these calls being discussed here do.

    However, this is highly dependent upon your server setup. Sometimes a query to the database takes less time then reading from a disk cache. Why? Because the database has its own query cache, in very fast RAM. It can pull right from there and give it back to you faster than you can pull it from the disk.

    Anyway, this just seems like a last resort type of optimization. Do the other things first. Install WP-Cache. Try the object cache. Increase the query cache on your mySQL server. Whatever.

    Yes, a pure statically served page will always be the fastest way to do things. But static content like this inside a PHP page is not the same thing at all. Whether you put “content” or “?php echo ‘content’; ?”, it’s the same code execution path. There’s no cost to switching in and out of the PHP context, it’s just a shorthand convenience, nothing more.

  14. Posted September 24, 2007 at 4:49 am | Permalink

    I thought these tips were very effective. Some of my blogs use a lot of categories and plugins, etc… I just followed all of these tips and I am noticing a significant performance difference, thank you so much Lorelle!

  15. Posted September 24, 2007 at 7:05 am | Permalink

    Don’t thank me. Thank John Pozadzides, guest blogger extraordinaire!

  16. Posted September 27, 2007 at 11:10 am | Permalink

    very helpful tips, stumbled here and added to favorites, i’m going to have to try these out. thanks!

  17. Posted September 29, 2007 at 3:58 pm | Permalink

    If you REALLY want to speed up WordPress (or any other PHP site for that matter) – then you can’t do much better than combining the large number of server requests for CSS and JavaScript files as outlined in Rakaz’s post.

    This alone saved about 40% on load time, and combined with either WP Cache or GZipping can save over 70% on load time for a non image-intensive site.

  18. Posted September 29, 2007 at 6:30 pm | Permalink

    Wow! Just by hitting it on the front page of digg is a great accomplishment. Keep up the great work man. Thanks for the tips.

  19. Posted September 30, 2007 at 5:30 pm | Permalink

    I strongly prefer Photobucket to Flickr.

    Maybe I’m doing something wrong, but when I upload a GIF file (only 25 KB) it is changed to a JPEG, which just doesn’t work.

    Photobucket keeps all files (under 1 MB) and file names the same. Made it much easier to convert theme.

  20. D. Casey
    Posted October 1, 2007 at 9:13 am | Permalink

    I’d also disagree with using a site like Flickr to serve up images – if it’s down, your photos are down… and, making the connection to their services seems to SLOW DOWN the loading of a page, not speed it up. I say this from personal experience of having used it for client sites… every single one of them is slower.

    The main issue for me, as a site designer/developer for clients, is that static html doesn’t allow the “noob” client to put new stuff in the site and have it show up everywhere necessary… for example, since I use Pages for most sites (using WP as a CMS), when a client creates a new page or subpage or wants to delete a page or change something, I need it to tap into all of the WP functionality to list the page/subpage in menus, create links, or remove a page, etc etc.

    Caching a site, particularly if it is one with Pages, will speed things up, imo. NOT using Flickr or external site services will also speed things up (including minimizing links to style sheets, scripts and such) and, probably most important of all… making sure your markup and css is 100% valid – THAT will definitely speed stuff up.

  21. Posted October 3, 2007 at 4:04 am | Permalink

    Good one Lorelle,

    Just moved over to Dreamhost at the same time as revamping my site and noticed a big slow down. Thought it wa the new host but will try this first. ‘ve got loads of php calls that are just waiting to be converted to plain old html. Call me ignorant, but I just didn’t realize that these calls were so intensive.
    Thanks,
    James

  22. Posted November 24, 2007 at 2:23 pm | Permalink

    I’m not brave enough to attempt changes to any template – is there a plug-in to do this for us?

  23. Posted November 24, 2007 at 5:47 pm | Permalink

    @Stephen Hopson:

    Depends upon what you want to do with your WordPress Theme template files. There’s a WordPress Plugin for a lot of things. You have to be more specific.

  24. Posted November 27, 2007 at 5:30 pm | Permalink

    I read this post with great interests. However it will remain in my bookmarks for some time I guess. My blog aren’t going to see traffic that calls for these solutions anytime soon I’m afraid :P

    Chrissy

  25. markwiseman
    Posted November 30, 2007 at 1:57 pm | Permalink

    Surely agree with you MommaDiary. The only time my server was strained was when I ran a link checker over the site and it followed every admin link from every page to every level. My host had to pull the plug. It will be a while before I have the same problem because of to many visitors
    Mark

  26. Posted December 1, 2007 at 8:35 pm | Permalink

    This is a great discussion going on and I am sure that it already helped lots of blog managers. I am truly thankful to the entry writer and appreciate if he continue writing good stuffs. I am also managing a wordpress site and simply used the wp-cache plugin. I am happy to say that the performance has significantly improved and gettin more traffic than ever before.

    Once again thanks a lot and keep writing.

    Thanks,
    Nash

  27. Posted February 18, 2008 at 12:45 am | Permalink

    Some great tips here. As a developer, I’d have to recommend against replacing things in your theme with static HTML. It sort of defeats the whole purpose of having a blogging engine that dynamically generates content for you. I realize it can result in a speed increase, but I think the trade off in this case isn’t worth it.

    I posted a few other tips on my site tonight if anyone is interested. They involve activating the apache cache module, which helps for things like jpegs etc.

    Good article though. Thanks for sharing.

  28. Posted February 18, 2008 at 9:48 am | Permalink

    @ Duane Storey:

    If you have to pay more for bandwidth, non-changeable content can go static without harm to anyone, especially if the site owner changes it. You certainly should not put “changeable” content in static HTML.

    I recommend to all who have even a flicker of a chance of a massive traffic spike to create a “stripped down” Theme they can quickly switch to if traffic comes in which incorporates static HTML to cut down on database hits. When the traffic goes back to “normal” then they can switch back to the full Theme. It’s easy and fast. For those who have done this, the trade off is worth it. Fast, no fuss, no panic, cheaper. But having the site optimized for traffic is a priority no matter what the traffic.

  29. Posted February 19, 2008 at 10:48 am | Permalink

    Even better, install and configure WP-Super-Cache. The Super Cache creates static HTML versions of your pages and then, using some minor .htaccess rules, serves those static versions when appropriate. This bypasses the PHP altogether, and is as fast as any other static site.

  30. Posted March 12, 2008 at 9:19 am | Permalink

    this is definitely a great post,
    I have been trying to find ways to make my wordpress load faster since I have installed many plugins.

    and this simple suggestions makes sense
    thanks

  31. Posted April 27, 2008 at 1:29 pm | Permalink

    Speed is not the problem with wordpress most of the time.Its comments.Yes i would like to read an article like this one Blogger aka Blogspot.

  32. Posted May 7, 2008 at 11:49 am | Permalink

    Just wanted to say, “Thanks!” Brilliant, easy-to-follow-article.

    I’ve implemented your suggestion and it has definitely decreased the load time!

    Thanks!

  33. Posted May 14, 2008 at 2:27 am | Permalink

    Hey thanks for this article. Just changed some code on my header cos of you. thanks, greetings from Sahara.

  34. Posted June 6, 2008 at 6:46 pm | Permalink

    I read about adding two lines to your wp-config.php file?
    to speed up downloading of a site:
    // Enable the WordPress Object Cache:
    define(ENABLE_CACHE, true);

    Does the program WPSuper Cache or WPCache 2 already add these lines or would I add these line in addition to these programs (Would I also install both of these programs or just one.)

    Thanks

  35. Posted June 6, 2008 at 9:38 pm | Permalink

    @ Roger:

    WP-Cache is not recommended for the latest versions of WordPress. I haven’t personally used Super Cache, so you will have to ask the author, Donncha, for information on how it works. Cache is built into the most recent versions of WordPress automatically. If you are using an old version of the wp-config file, you may have to update this information. Check with the new file version.

  36. Posted June 28, 2008 at 4:33 pm | Permalink

    Thanks for the great tips! Ok I’m guilty of having one mainly for looks, but these tips helped tremendously! very much appreciated.

  37. Posted August 29, 2008 at 12:36 am | Permalink

    I installed latest WP-Cache module version on WordPress 2.5.1 and I haven’t any problem. It’s working fine. Someone has wrote that with WP-Cache, PHP is not running at all – everything is served from cache. This is not true, because minimal PHP code have to check: is requested page cached, is it expired, if page is expired then generate new page and save it to the cache and so on. I also made benchmarking on WordPress installation without WP-Cache and with WP-Cache, with APC turned on and MySQL caching turned on. Results vary from 3.44 requests per second to 467 request per second on 2.6GHz dual core P4 with 1GB of RAM.

  38. Posted September 17, 2008 at 5:22 pm | Permalink

    Feed flare is located under “Optimize” tab now.
    By the way, I have a function I added to the file “function.php” to exclude some categories from being displayed on the front page and a plugin that does the same. Which is better and faster to be used? A function or a plugin instead?

  39. Posted September 20, 2008 at 3:21 pm | Permalink

    wow…that header part is over looked by many!

  40. Posted October 14, 2008 at 1:06 pm | Permalink

    Lorelle,

    You were saying, “WP-Cache is not recommended for the latest versions of WordPress. I haven’t personally used Super Cache …. Cache is built into the most recent versions of WordPress automatically.” What is the starting version of wordpress that has cache buit in and therefore WP-cache installed on wordpress is not recommended for these newest versions of wordpress? 2.5?

    Thanks Lorelle

  41. Posted October 15, 2008 at 6:12 am | Permalink

    Nice post and very informative. I did exactly as you described and I can already see a noticeable improvement. Thank you for the info.

  42. Posted October 29, 2008 at 1:46 pm | Permalink

    Thank u so much… Indebted to u a great deal

  43. Posted November 11, 2008 at 1:34 pm | Permalink

    Wow! Thanks for the coding to speed things up. I saw a plugin designed to do the same but found it too complicated. Much easier to simply sub your code.

  44. Posted February 17, 2009 at 8:56 am | Permalink

    Very kickin’ article. thanks for sharin’. i’ve just configured wp-cache plugin but i don’t it seems not working on 2.7 version of wp. can anyone help this out?

    • Posted February 17, 2009 at 10:35 am | Permalink

      When you are having trouble with a WordPress Plugin, contact the author first. Check out their site and look for answers in the posts and the comments, then check the WordPress Support Forums. Also, upgrade to the latest version and that might resolve your issues. Until then, turn it off since that Plugin has had problems in recent versions but I believe the author has updated it with fixes, and why not try another cache Plugin like WP Super Cache.

  45. Posted March 16, 2009 at 8:52 am | Permalink

    Thank you for this simple and straight-forward tricks. I have followed your advices. Particularly on Remove unnecessary PHP executions and DB access. Whew! that tip was great.

    I’m afraid, maybe my site won’t load exactly after i have edited it, and change the php codes into a static html.

  46. Posted March 19, 2009 at 6:46 pm | Permalink

    Thank you so much for the tips!

  47. gregoranton
    Posted May 4, 2009 at 9:13 pm | Permalink

    Great info. Are there any plugins that you recommend that will speed up my wordpress blog? or plugins you DONT recommend?

    • Posted May 5, 2009 at 9:50 am | Permalink

      LOL. Any Plugin will slow down the loading of your WordPress blog. These are some good recommendations above, and WP SuperCache would be my other recommendation. Limit the number of Plugins and use WordPress template tags and well designed WordPress Themes to replace things like the SEO Plugins to save loading and bandwidth wasters.

  48. Posted May 10, 2009 at 3:13 pm | Permalink

    Great Stuff…There’s a definite improvement in my loading times after stripping PHP references from my header and Footer files.
    I also have WP-cache switched on with super cache compression enabled.

    Still on a quest for further improvements.

  49. Posted August 10, 2009 at 5:51 pm | Permalink

    Thank you so much for the advice about changing the PHP to HTML, im a noob when it comes to coding and this helped me a lot, thanks again and it did make my site 20 times faster :)

  50. Pubudu
    Posted August 14, 2009 at 6:00 am | Permalink

    3 more useful tips

    http://www.earth-org.com/blogs/2009/08/want-to-speed-up-wordpress/

  51. savavoom
    Posted August 24, 2009 at 8:06 am | Permalink

    If you want to easily and quickly see what code to change in the header just put the code (as stated in the article) in notation points, for example:

    Then the code that you need to copy is here (i.e. the php stuff like he said in the article)

    I tried to write in the code to use but it wasn’t viewable! Here it is again with spaces and stuff in so that you can get the jist.
    code you want to copy
    The text inside the will be ignored by the browser but you can see it in the view source. So when you go to copy the code that you need to replace the php with then you can quickly and easily see which bit of code you need as you have already marked it out in the header.php file.

    When it says “exclamation mark” don’t write that use an actual exclamation … !

    Hope this helps for people who find it hard to identify code when it’s been processed.

    cheers
    robbie

  52. Posted August 31, 2009 at 8:30 pm | Permalink

    Am new to WordPress and now setting up a magazine website and i found this information much useful and it will help a thousands to sole many issues thank you

  53. Posted September 17, 2009 at 4:23 am | Permalink

    WordPress can be significantl accelerated with Web Optimizer plugin – http://wordpress.org/extend/plugins/web-optimizer/
    It adds caching, merging, minify, gzip, and all the YSlow best pracices in one click.

  54. Posted December 10, 2009 at 11:40 am | Permalink

    Eber, Your right about the title, and my next project is to have multiple sidebars and I think I will need the a php for the different style sheets. I plan on taking out the wp verison and change he rss & atom feeds.

  55. Posted December 14, 2009 at 6:39 am | Permalink

    I’ve just rebuilt my site from a static html site to WordPress and in Google analytics my web page load time has gone from an average of 4 seconds to over 16. I’ve since installed and configured WP super-cache which only shaved two seconds off that average.

    I might have to balance lots of cached pages against super-cache refresh setting as my site is not that busy and unlikely ever to get hit by a digg storm or any similar thing. I’ve not found any definitive info on that yet. It’s one of those – how long is a piece of string – problems.

    This is what I am doing now. Looking for tips to speed things up to near where they were with static pages.

    There are lots of old advice about replacing database calls and php calls with hard wired info. But the newer information on WordPress seems to be that the latest versions have optimisation built in which reduce the need for these older methods of replacing calls. Both in database terms and php.

    I’m still looking…

    • Posted December 15, 2009 at 1:39 am | Permalink

      You might want to look at what is IN your blog, not just the framework that holds the content. Content can slow things down just as much as anything, in fact, often more. Caching can speed things up, but you might be looking in the wrong place. Just thinking out loud. :D

  56. webjunkie1961
    Posted February 10, 2010 at 8:09 am | Permalink

    Being new to wordpress but an hack to php I read this article. I just spent 5 mins looking at my theme, it had 7 if statements and 2 includes just to make the favicon work! Just back spaced out 40 lines of useless code code see the speed difference instantly and I have not yet begun to fight! Thanks a bunch

  57. Allison
    Posted March 2, 2010 at 12:56 pm | Permalink

    Thanks for the tips on swapping out HTML for php..it made a BIGGGG difference!!!

  58. Posted March 25, 2010 at 1:23 am | Permalink

    I have just moved my site from a static site to WP and my URLs still end with .html although they are not static anymore. Basically it still functions as a static site. What is the best way to speed it up as it is pretty slow? I have way too many plugins and I am now thinking seriously about each one before I install it. What is the best plugin or way to speed up such a site (WP-cache?)?

    • Posted March 28, 2010 at 4:37 pm | Permalink

      Ewe! Kill the html extension. It’s useless. Who cares. To speed up your site, there are many more options. Changing the extension has NOTHING to do with speed, just useless cruft. Seriously, why other? If your site is slow, Plugins won’t help, though WP-Cache is good. Have you done serious testing of your site’s loading speed beyond what your computer and internet connection? Don’t trust them. Trust testing sites.

      Get rid of the useless huge images, videos, and time waster huge file size crap on your site. That will speed things up. Not saying you have crap, but everyone has stuff they can get rid of to speed things up. And see what the tests say. You might have to change servers/hosts.

  59. Posted April 15, 2010 at 8:57 am | Permalink

    Hello,
    Here is another case study…I have a domain ‘techufo.com’ now i had the latest version installed i.e- 2.9.2….It worked fine with all kind of themes for almost 2 weeks….But suddenly 1 day…it stopped loading and my blog’s administration panels does not show up…i then installed Beta version 3.0…it showed up for about….10mins…and then again it stopped loading anything…all i can see is a blank screen……Please help…

    • Posted May 7, 2010 at 2:27 pm | Permalink

      Please ask in the WordPress Support Forums to get faster help. This sounds like a server issue or bad installation. Upgrading to a beta version is too risky, so please don’t do that again.

  60. Posted April 18, 2010 at 4:54 pm | Permalink

    I am a bit confused about the image size tags. If your image is 200px wide and wish it to be displayed at that width, is it still faster if you specify width=”200px”? Currently if the image is the size I want to display I do not put the size tags in.

    • Posted May 7, 2010 at 2:08 pm | Permalink

      It may be faster, if that is your end goal width, but the picture may or may not be able to work at that width if you are resizing. However, a page loads faster if the browser knows in advance what the image size is so they can prepare for it, instead of waiting until it loads and hoping the browser will figure out the spacing correctly (Internet Explorer, are you listening?). WordPress automatically puts in the size specifications, so you don’t have to worry about that any more. And helps you choose which size the viewable image (thumbnail) is.

  61. Danielle
    Posted July 30, 2010 at 2:14 pm | Permalink

    Thank You, Thank You, THANK YOU! This helped tremendously!

  62. Spencer Tomosvary
    Posted August 15, 2010 at 10:18 pm | Permalink

    Another alternative to WP Cache and WP Super Cache is DB Cache for WordPress. “AskApache” claims that it offers superior performance.

    Regarding using YouTube, Flickr and other 3rd parties to host content for speeding up your site, this can have the opposite effect. Even Google Analytics or other tracking scripts which are hosted on their respective third party sites can slow down your site. If you host these scripts on your own server your sites load time is reduced.

    • Posted August 16, 2010 at 8:25 am | Permalink

      There are now many alternatives for cache, in Plugins and server options. While third party hosting services like those you’ve mentioned do slow down your site, hosting them yourself with a high viewing rate can cause more problems as well. Those tend to be more costly than just slowing page loading. :D

  63. Posted October 30, 2010 at 9:21 pm | Permalink

    Thanks Lorelle!

    One really handy plugin I’ve found for CSS, XHTML & JavaScript compression is the Autoptimize plugin. I’ve outlined that and a few other technique I used to bring my site load down from 8 secs to 3 secs here if anyone is interested.

  64. Sanjay
    Posted December 13, 2010 at 9:32 am | Permalink

    Thanks. Removing some unnecessary PHP executions and DB access seemed to speed up my wordpress

  65. Posted February 25, 2011 at 3:18 pm | Permalink

    W3 Total cache is best for caching. Great tips thanks for sharing :)

  66. Posted February 26, 2011 at 11:03 am | Permalink

    his is what I really want. I was looking for this certain info for a long time. Thank you and good luck.

  67. isreejesh
    Posted December 8, 2012 at 10:37 am | Permalink

    A lot has updated and changed since since post was published in 2007 but your tips are still worth a lot for better wordpress load time. I enjoyed your help from your articles.

  68. Dushyant
    Posted August 25, 2013 at 8:24 am | Permalink

    Wow !! This is SO Awesome !!
    thanks for the Great Article :)

  69. Tushar
    Posted September 29, 2013 at 7:19 am | Permalink

    My Website is facing CPU Throttling issue. Will these tips can help to avoid it?

    • Posted October 2, 2013 at 11:25 am | Permalink

      Your site is not facing a CPU throttling issue. It’s facing a server slow down. CPU throttling is known as “dynamic frequency scaling” and happens on hard drives not servers. Your site is on a server. Your desktop or laptop computer may influence the speed that a web page loads, but that’s a computer problem, not a WordPress nor web-based issue. Good luck with that.

  70. sheshnath
    Posted April 5, 2014 at 10:36 pm | Permalink

    Hi,
    Thanks for this wonderful article, this is what I was looking for :)

  71. Posted April 7, 2014 at 12:08 pm | Permalink

    Hello There,

    I tried replacing php codes in header with html and then tested it on gTmetrix. What I found was shocking. My ySlow grade dropped from 75 to 73.

    Please help me here.

    Thanks in advance!

    • Posted April 10, 2014 at 10:03 am | Permalink

      Put them back. :D

      You’re welcome.

    • Posted April 10, 2014 at 10:27 am | Permalink

      LOL!

      Do you know why that happened? Any idea?

    • Posted May 12, 2014 at 9:26 pm | Permalink

      No clue. Human error is my best call.

      If you mess with the code that messes with your pagerank and random-useless-but-people-let-them-control-their-online-life tools, you will get a response. Doesn’t mean that it means anything, but there we are. Human error messed things up, or the bots didn’t like your changes…or a thousand things.

      Honestly, publish as if you are doing so for human beings and let the arbitrary scoring systems alone. Use them once or twice a year to check in and stop micro managing them – well, letting them micro manage you. LOL!

  72. Vineesh C
    Posted July 23, 2014 at 8:37 am | Permalink

    Now site is loading fast after implementing these. thanks a lot


85 Trackbacks/Pingbacks

  1. [...] The 3 Easiest Ways to Speed Up WordPress gyorsítsd a wpt (tags: wordpress howto) [...]

  2. [...] on WordPress has a nice article on 3 ways to speed up WordPress. Tips include database call optimizations, reduction in number of PHP scripts, [...]

  3. [...] 25th, 2007 at 2:13 am (Scripting) In the blog article The 3 Easiest Ways to Speed Up WordPress, John Pozadzides discusses improving page load time. The Clean Options plugin can help by removing [...]

  4. [...] The 3 Easiest Ways to Speed Up WordPress (Lorelle on WordPress) [...]

  5. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  6. [...] The 3 Easiest Ways to Speed Up WordPress So, in the past 2 weeks I’ve had 3 articles hit the front page of Digg. Let me just tell you, the onslaught of traffic can bring a server to it’s knees. Over the last many months I’ve learned a thing or two about tweaking WordPress, and while this is not meant to be an exhaustive tutorial on how to survive a Digg, it will give you some tips that can definitely improve your blog’s performance for all of your visitors. [...]

  7. [...] var John Pozadzides, fra One Mans Blog, innom Lorelle on WordPress som gjesteblogger med artikkelen The 3 Easiest Ways to Speed Up WordPress. Her la John fokuset på tre punkter: There are three main things which will slow down your site [...]

  8. [...] oleh WordPress, sehingga dapat memperlambat proses loading halaman blog kita, menurut artikel “The 3 Easiest Ways to Speed Up WordPress” ini begitu [...]

  9. [...] nieużywane wtyczki! Nawet jeśli są wyłączone w PA, system nadal próbuje je rozpoznawać (jak twierdzi Lorelle), więc lepiej je usunąć jeśli z nich nie [...]

  10. [...] na to, e Blogger opierajc si od The 3 Easiest Ways to Speed Up WordPress po prostu powieli bzdur, ktr napisa autor pierwotnego dokumentu. A potem ludzie si dziwi, e [...]

  11. [...] followed Lorelle’s instructions on replacing some php calls in my theme with straight HTML. I think this actually makes a big difference on load time, [...]

  12. [...] – Lorelle | Reaper-X | FactoryCity | Arne Brachhold | John TP | Joost de Valk | WpCandy [...]

  13. [...] Vija pinavija [...]

  14. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  15. [...] The 3 Easiest Ways to Speed Up WordPress post on Lorelle Von Fossen blog is a great tutorial that expands on many concepts of optimization and makes it simple for ya [...]

  16. [...] 《The 3 Easiest Ways to Speed Up WordPress》 [...]

  17. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  18. [...] One page I found described the 3 easiest ways to speed up WordPress, and that was a wonderful and very simple set of ideas to follow. The page I originally landed on was also on that site, but between my first hit and the second, I landed here, where the author gives a much longer list of ideas for speeding up loading times and reducing clutter so that visitors can find your content. I don’t think it ever got so bad that one could not find my content, lol, but I was doing way too much pimping of my rank here and there for no good reason. I’m back now to my simple Feedburner subscriber count, and the rest of the widgets are gone. I’ve added tiny little banners instead. As a matter of fact, I also made one for me. See : [...]

  19. [...] Why My Site Is So Much Faster Than Yours The 3 Easiest Ways to Speed Up WordPress [...]

  20. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  21. [...] Why My Site Is So Much Faster Than Yours The 3 Easiest Ways to Speed Up WordPress [...]

  22. [...] pero por suerte me pusé las pilas y gracias a tres simples consejos que me dió John Pozadzides en Lorelle pude acelerar muchísimo la [...]

  23. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  24. [...] The 3 Easiest Ways to Speed Up WordPress by Lorelle [...]

  25. [...] Reading about how to speed up my website. [...]

  26. [...] 《The 3 Easiest Ways to Speed Up WordPress》 [...]

  27. [...] To speed up load times, simply replace the above requests to absolute destinations and you just saved some micro seconds of load times! What other tips do you have on speeding up your scripts? Thanks to Lorelle. [...]

  28. [...] The 3 Easiest Ways to Speed Up WordPress « Lorelle on WordPress [...]

  29. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  30. [...] CPU processing time and database queries, and under load this can make a big performance difference.Read more. John’s article discusses how you can replace php codes with html codes, allowing your site to [...]

  31. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  32. [...] http://lorelle.wordpress.com/2007/09/22/the-3-easiest-ways-to-speed-up-wordpress/ [...]

  33. [...] Lorelle on WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  34. [...] The 3 Easiest Ways to Speed Up WordPress « Lorelle on WordPress [...]

  35. [...] Lorelle on WordPress: Las 3 formas más fáciles de acelerar WordPress [...]

  36. [...] Lorelle on WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  37. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  38. [...] Lorelle upon WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  39. [...] まずは「The 3 Easiest Ways to Speed Up WordPress « Lorelle on WordPress」から(これを「3 ways」と書くのはズルイなぁw)、 [...]

  40. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  41. [...] (The following explanation comes from The Three Easiest Ways to Speed Up WordPress) [...]

  42. [...] 3 Easiest Ways to Speed Up WordPressJohn Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  43. [...] 3 Easiest Ways to Speed Up WordPressJohn Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  44. [...] 3 Easiest Ways to Speed Up WordPressJohn Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  45. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  46. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  47. [...] 3 Easiest Ways to Speed Up WordPressJohn Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  48. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  49. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  50. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  51. [...] 《The 3 Easiest Ways to Speed Up WordPress》 [...]

  52. [...] Avoid unneeded calls to a MYSQL database that you can embed right into your code. For WordPress, check out three  quick tips to make it [...]

  53. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  54. [...] Why My Site Is So Much Faster Than Yours The 3 Easiest Ways to Speed Up WordPress [...]

  55. [...] to sell to you as if you were at a local street market.Source 1: Awesome WordPress Theme Source 2: Lorelle WordPressThis website uses IntenseDebate comments, but they are not currently loaded because either your [...]

  56. [...] Source: Lorelle on WordPress [...]

  57. [...] More information can be found on the source article. [...]

  58. Page Ranking mit WordPress verbessern…

    Wie ihr vielleicht bereits im Google Webmaster Blog gelesen habt (oder auch nicht ), steht Goolge ja sehr auf Speed, nicht nur bei ihren Applikationen sondern auch beim Aufbau von Internetseiten. Daher wurde der Faktor, wie lange eine Seite für ihren A…

  59. [...] Lorelle on WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  60. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  61. [...] [...]

  62. [...] The 3 Easiest Ways to Speed Up WordPress post on Lorelle Von Fossen blog is a great tutorial that expands on many concepts of optimization and makes it simple for ya [...]

  63. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  64. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  65. [...] Remove unnecessary PHP executions, DB access, and server requests [...]

  66. [...] The 3 Easiest Ways to Speed Up WordPress post on Lorelle Von Fossen blog is a great tutorial that expands on many concepts of optimization and makes it simple for ya [...]

  67. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  68. [...] an interesting discussion on Lorelle’s blog (from way back in 2007) in which Matt and Otto dispute the effectiveness of replacing these queries with HTML. If you’re a speed-geek it’s an interesting discussion to read and there’s quite a lot of [...]

  69. [...] Lorelle on WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  70. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  71. [...] Replace PHP with static HTML where you are able (check out this great post on how to do just [...]

  72. [...] PHP with static HTML where you are able (check out this great post on how to do just that) Tweet Posted in: Tips, WordPress   Tags: optimize, plugins, [...]

  73. [...] cao]Thay mã PHP bằng mã HTML tĩnh khi có thể (hãy xem bài viết này để biết cách [...]

  74. [...] Lorelle on WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  75. [...] Lorelle on WordPress: The 3 Easiest Ways to Speed Up WordPress [...]

  76. [...] More information can be found on the source article. [...]

  77. [...] be doing this great post injustice if I didn’t link to it for this topic, as it taught me how to easily do this [...]

  78. [...] 3 Easiest Ways to Speed Up WordPress John Pozadzides shares how his blog sails smoothly through a Digg traffic spike. [...]

  79. [...] The 3 Easiest Ways to Speed Up WordPress [...]

  80. […] The 3 Easiest Ways to Speed Up WordPress by John Pozadizes gives some simple and easy-to-do tips to help speed up your WordPress blog. […]

  81. […] The 3 Easiest Ways to Speed Up WordPress by John Pozadizes gives some simple and easy-to-do tips to help speed up your WordPress blog. […]

  82. […] The 3 Easiest Ways to Speed Up WordPress by John Pozadizes gives some simple and easy-to-do tips to help speed up your WordPress blog. […]

  83. […] Here is a link to changing the PHP to static Html. […]

  84. […] be doing this great post injustice if I didn’t link to it for this topic, as it taught me how to easily do this myself, […]

  85. […] The 3 Easiest Ways to Speed Up WordPress […]

Post a Comment

Follow

Get every new post delivered to your Inbox.

Join 20,664 other followers

%d bloggers like this: