Tuesday, November 25, 2008

3 best ways to Optimize your wordpress theme

One of most powerful and advance feature of wordpress is it themes. There are thousands of FREE and paid themes available for wordpress. It is not harder to create a new theme for wordpress even if you have only a little knowledge of php web development or html. Wordpress themes are what display everything on your blog, including pages, posts, categories, archives and your front page.You can create your own theme or you can use the Yvo Schaap’s online theme designer to create wide range of colorful and beautiful themes easily.Every wordpress theme uses many different functions, loops to load content on your blog. Wordpress’s core system itself calls many queries before loading your theme files. With few of following tweaks, you can easily optimize your wordpress themes to reduce server load and to provide faster output.

1. Define variables instead of calling functions each time
There could be many functions being used in themes. You can define variables in your header file to avoid calling those functions again and again and just use the pre-define variable by a single function call. For example, you may be using bloginfo, the_permalink, get_option etc. Define their variables and avoid using them again and again for same purpose.

2. Avoid loading unnecessary javascript, css
At some of your pages you may need additional javascript or css files to be loaded.

3.Use WP super cache is one of best plugins for me.
It generate static content for your blog. Even the function calls. It can generate static front page, single posts, category pages in form of html. So until the cache time is over, those html files will be loaded to user’s browser and generate only a tiny bit of load to your server.

No comments:

Post a Comment