tags:

views:

94

answers:

4

Hello again! today i'm in a asking spree :P

Anyhow... Right now i'm developing some free wordpress theme. The problem is that i want to make it as flexible as possible so that's why i will use some themes options to set some CSS colours, some widths and so on. My question is this:

If i assume that one of this themes will be used for a heavy traffic blog, how this will affect server performance? I will have an increase of SQL queries? Or something else (wrong) ?

+3  A: 

I do not think there will be an increase in the number of SQL queries. Unless, of course, you decided to extend the worpress functionality by making the theme somewhat data driven.

However the size of your templates/images/CSS/javascript files may have some impact on the performance of the application.

As a general rule of thumb, if you are concerned about the performance of a web based app, it is always good to keep your files as light as possible.

Deep Kapadia
the size in kb of css/html is not a problem :) only this is a problem, options :P
Ionut Staicu
A: 

Wordpress isn't renowned for being gentle on the database - although I guess there might be intentions to improve over time.

So you're not causing big problems by adding an extra query.

But keep it to one query: have all your options so that one SELECT will get them all, and call that once per page load.

Alternatively, don't store the options in the database. Have a config file that lives in your theme directory.

slim
+1  A: 

Anyone using WordPress for a high-traffic blog is almost certain to be using WP Super Cache, which means almost all pageviews will cause (depending on whether the super bit is being used) either 0 or 1 SQL queries, regardless of what your theme does.

ceejayoz
A: 

You shouldn't really be adding anything that does anything but provide styling to your theme, if you want to keep database loading low. (Of course, I mean other than the default data retrieval functionality found in pretty much all themes.)

The only parts of your theme that should really be doing any significant querying are:

  1. The regular bits and bobs in the loop (for the main blog page and archive pages)
  2. The comment retrieval (for single-view posts)
  3. The sidebar (presuming you're going for a widget-enabled sidebar)

I'd suggest leavingextra functionality (and, therefore, extra DB queries) to plugins - a theme should focus purely on aesthetics.

James Burgess
well... those options are fo... aesthetics :)
Ionut Staicu