So, You got a website running on wordpress, but yet you have a problem that its running slow, Optimization FAILURE? . Thats not a problem, thats the problem. So what you gonna do?
There are several reason which can make your site slow. From your hosting company to your content, all of them can be guilty for the death of your nice site. Im calling it death because people really don’t like a site that taking more time to load then usual. And suddenly uncle google said that the page rank will also depend of page speed. So, Time to speed up.[ Don’t forget to check the Resource Section in the end for required resources ]
Find a Great Web host
Well, Before you start your site, you should consider about a good hosting company. A good hosting company is just not good for your site, it also give you a happy day. Before signing up for a host, You should look for several things about it.
- Google for it, See what comes up. You can find both the good thing and bad thing about it.
- Read their Teams and Condition carefully, it will tell you a lot about the hosting provider if you are smart.
- Never, I repeat, Never use a shared hosting if you know there will be more then 10000 visitor in your site everyday. Get a VPS.
Your Coding style is another important thing. You code can get you a faster website, on the other hand, a slow website also. Why?
- Try to follow the standard code style. It will help you to keep the code clean.
Useless Things Matter
If you are developing your own theme, Do a cleanup before uploading. There will be some useless code, Some extra line which you might commented out while testing. Remove them.
There are actually Two Types of Caching. Browser Cache and Server Cache. Both are needed and useful for each and every types of site. How?
Now, While this Request and Data exchange, Cache mean, Keeping a local copy of the static content. Like when you are browsing my site, as the browser cache is enabled, your browser will keep a local copy of the static content of my site. The next time when you will visit my site, First the browser will verify from the server that whether those static content still under use or removed. If under use, Then it will fetch them from your local copy rather then from the server, that will save whole lot of a time and speed. But its not that simple as it looks, there is a few more thing to be discussed, but can be discussed here. Probably later.[ Know more ]
CDN- Speed Optimization
Content Delivery Network, Currently one of the most important thing when you are thinking about running a heavy site. Now its quite a tough job for me to tell you what this freaking this actually is, But trust me, its something you don’t wanna left behind. I guess its best to refer you to the wikipedia for CDN explanation.
It will take care of your static content and will provide you a faster site when your static content is loading through a p2p CDN service. And if there is browser caching, You are on the fly.
What if you currently can’t afford a CDN? Well, Relax, You can always find you need, if you know where to look. You will find your answer in the Resource Section at the End of the Article.
Question and Answer- WordPress
Question: I don’t need a CDN for my site as its a personal site with less visitor. Anything for me?
Answer: Yes, There are a few thing for you. Use a Image Sharing server to host your image. Try not to upload file in your hosting, Keep them in a Image sharing site. You can useimgur.com / imageshack.us / photobucket.com / tinypic.com . Upload your image there and put the direct link here, Thats all. All of them have their own Delivery network to handle the load.
And, to be bold, There is the most awesome service in this arena, Specially if you are a photographer, flickr.com, With a space of 1TB, you can expect it to be never finished.
Question: Okey, Now what about my JS files?
Answer: Common Script like jQuery, jQuery UI, Mootools, Prototypes can be Fetched from A Content Distribution Network. There are Several Content Distribution network around, which will let you use their hosted JS files for your site. The most reliable one is The Google Hosted Libraries . When its from google, you can relax. You can find the most famous JS libs from here.
For a Different taste and a Wide range of Hosted JS libs, Go for CDNJS , I think it is the most wide range JS lib hosting. You can find most of them here.
There is actually no end of this Article. More then a 100 things can be done to reduce loading time, But it depend on your site. These are the basics. It will get you a much faster site then before. I will probably write another article with some un-orthodox way to speed up your site. Till then, Speed up your site
- Keep the excerpt in the homepage rather then full article.
- Keep 5-7 Post in your home page.
- Keep sharing widget / code only in the post, not in homepage.
- Write what needed. Text do have size.
- http://wordpress.org/extend/plugins/w3-total-cache/ ( Best Cache Plugin So far )
- http://wordpress.org/extend/plugins/wp-smushit/ ( Use it, If you want to upload image inside wordpress )
- http://wordpress.org/extend/plugins/wp-optimize/installation/ ( Database Optimizer for WordPress )
- http://www.dzinesoup.com/wordpress-pingbacks-trackbacks-and-linkbacks ( Problems with Pingbacks and Trackbacks )
- http://lorelle.wordpress.com/2007/09/22/the-3-easiest-ways-to-speed-up-wordpress/ ( A Super Cool No-Nonsense Article )
- http://wordpress.org/plugins/lazy-load/ ( When you’ve added a few pic in a article, Its your live saver )