Click to See Complete Forum and Search --> : How can I get my wordpress/zenphoto website to run faster?


bpetruzzo
10-02-2008, 04:53 PM
I have a Wordpress installation and an Zenphoto installation which are both themed to match one another. The Zenphoto installation shares the Wordpress header and footer so some of the wordpress plugins carry over to ZP. The trouble is, even on a fiberoptic connection, the loading time can be frustrating. Sometimes 4 - 5 seconds to finish loading. For me, that's not bad, but I hate to think what people on regular DSL lines or even dialup must be experiencing.

Basically, I want to find a way to help speed things up. I know my server is faster than what I'm getting. I don't really know how to do that. Can someone offer some suggestions?

This my website here:
http://www.petruzzo.com

I tried installing a Wordpress plugin used to help cache pages but it caused a conflict with ZP.

ratcateme
10-02-2008, 05:31 PM
i ran YSlow on your page it suggests
make fewer requests:
your page loads 13 JS files and 7 CSS can you make these into one or two?
expires header:
your images,js files and css files dont have expires headers so ever time someone loads your page they have to reload them(i think that is what it is trying to say).
gzip:
your css and js files are not gziped proberly not a biggy but if you make them into one or two big files you might want to consider it
js at the bottom:
if you take your js includes out of the <head> then the browser can display the page while it loads those js files

hope this helps

Scott.

bpetruzzo
10-02-2008, 05:40 PM
Hmm. In my header I have 4 js and 3 css. I'm guessing the rest are coming from plugins, which I don't think I'd know how to go through and combine into one file.

I'm not sure what the expires header thing means? Is that something I can add to my existing set up? Also, how can the js files be moved out of the head? I thought they wouldn't run?

bpetruzzo
10-02-2008, 06:06 PM
Ok, I went through the header file and removed all the erroneous calls that I could and it did make a noticable difference. Although I only actually removed about 4 of them. Can you run that thing again and see what it says?

ratcateme
10-02-2008, 08:59 PM
yea it didn't change much i guess you might just have to live with it most of the js and css are in your plugins so not much you can do about it.

Scott.

bpetruzzo
10-02-2008, 10:16 PM
Ok, I got ambitious and I went and combined all the css files throughout my various plugins into one file. I went and combed through the plugin php files to remove the calls for the css files so that it's only being called for once. It feels like things are running a little lighter. Now, I'd like to move on and try the same thing with the javascript files. I found about 6 - 7 that would be called each time the user visits the site.

I tried combining them into one file but discovered that I think I don't know how to go about doing that. What would the syntax look like inside the js file?

bpetruzzo
10-03-2008, 09:06 AM
anyone know?

ariell
10-03-2008, 02:00 PM
What would the syntax look like inside the js file?

What exactly is your question about? How JS looks like?

bpetruzzo
10-03-2008, 03:22 PM
No, I mean, I don't know very much about javascript. I couldn't write it to save my life. I can cut and past code though. But, when it comes to taking five different js files and putting them into one, how would those files be strung together in the one big js file?

Shorts
10-03-2008, 03:29 PM
just put one after the other.

code_1.js:

function code_1() { /* do stuff */ }


code_2.js:

function code_2() { /* do stuff */ }


code_3.js:

function code_3() { /* do stuff */ }


Now combined:

function code_1() { /* do stuff */ }
function code_2() { /* do stuff */ }
function code_3() { /* do stuff */ }

bpetruzzo
10-03-2008, 03:30 PM
Should it matter what order its in?

Shorts
10-03-2008, 03:41 PM
nope