Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Please help me improve load time if you can

  1. #1
    strive4impact is offline Hello World
    Join Date
    Nov 2010
    Posts
    1

    Default Please help me improve load time if you can

    Hi!

    I don't know PHP - I can look at it, and understand what's opening and closing, but don't know how to make any kind of changes other than copy/paste ones. I do get CSS and HTML though.

    That having been said... I'm looking for some help optimizing my page for load time. I would like to keep all the plugins I have running now, but I want to combine the stylesheets and server calls. My web host is yelling that I'm taxing too much of their resources - and have actually shut down my site more than once (already in the process of migrating away to a new host), but want to know how I can get rid of so much stuff having to load just to make my site run.

    Can I combine all the files into one? (Won't the plugins still just try to put their respective stylesheets into the header anyway?)

    How can I combine the scripts without breaking them?

    Site: http://www.CarrieAndJonathan.com

    Any help MUCH appreciated.

    Warmest,
    Jonathan

  2. #2
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Your front page took 7.8 seconds to load for me, which is WAYY too long. This is normally caused by either an over-loaded server or from inefficient scripts. Try testing with the default theme and no plugins to see how long it takes to load, then testing again with your current setup and see if here is a noticeable difference. If there is, then it's your plugins and theme which are causing the problem, otherwise it's likely to be the server being overloaded.

    The most common cause of server overload is a dodgy plugin, so look closely at what plugins you are using (particularly anything which hammers the database a lot, ie: stats plugins) and try to weed out the unnecessary ones or those which could cause load problems.

    The main problem I see with your current setup is that you aren't running any caching plugins (or at least it looks you aren't). W3 Total Cache can handle that, plus it is able to combine all your CSS and JS files for you too. That should keep your host off your back for a while at least. Below are a few things I noticed, some of which you are already aware of (ie: the CSS files issue).

    You are loading jQuery, Scriptalicous (sp?) and Prototype, whereas you should only be loading one of those.

    You have seven CSS files loading, whereas you only need one (the others are probably from plugins).


    Unrelated to performance: You have a script loading after the body tag, presumably because it's hard coded into the themes footer.php file. This is occasionally caused by your site being hacked, so it would be a good idea to double check that you intended to load that script (I didn't check to see what it does).
    HTML Code:
    </body>
    
    </html>
    
    
    
    <script type="text/javascript" src="http://forms.aweber.com/form/37/split_2029742637.htm"></script>

    Remember though, that if you are getting shed loads of traffic, that there's no way you will be able to survive on shared hosting. You will have no choice but to upgrade to something more heavy duty at some point.


    BTW, you should come to Dunedin! It's much nicer down here than in Auckland :)

  3. #3
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Off-topic: Travel blog from some Kiwi's I met last year at WordCamp NZ ... http://indietravelpodcast.com/

  4. #4
    leewillis77 is offline Hello World
    Join Date
    Oct 2010
    Posts
    22

    Default

    Check out something like W3 Total Cache or WP Super Cache. They can handle this sort of thing for you.

  5. #5
    Ipstenu's Avatar
    Ipstenu is offline Big Tipper
    Join Date
    Feb 2010
    Posts
    368

    Default

    W3 Total Cache has minification built in, and that can help a lot too.

  6. #6
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Quote Originally Posted by Ipstenu View Post
    W3 Total Cache has minification built in, and that can help a lot too.
    Or make it worse depending on how often the cache is refreshed.

  7. #7
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,359

    Default

    I've never been able to get minification to work without it causing plugins and the site to break. Probably due to the way the plugins have been coded.

    I would suggest W3 Total Cache in conjunction with an affordable CDN (Content Distribution Network) which would definitely ease the load on the server.

  8. #8
    C3MDigital's Avatar
    C3MDigital is offline Hello World
    Join Date
    Mar 2010
    Location
    Houston, TX
    Posts
    45

    Default

    Like the others have mentioned, W3 Total Cache will drastically help your page loading times. I wrote an article that goes over all the settings and how to get the most out of it on a shared host: Reduce Page Loading Time with W3 Total Cache.

    Use the help wizard in the minify section and W3 Total will scan your theme and plugins and suggest all the CSS and js files to combine and minify. For the CSS choose all the files it finds but for the js files you will have to do some trial and error before everything will work right. A lot of times inline scripts won't work unless jQuery is loaded first I usually have it add it to < head > along with any other scripts that rely on jQuery. For everything else I put it before < /body >. Some scripts won't work when minified like lightbox.

    Page caching and reducing get requests will help some with your host problems but they are probably more related to your plugin database queries. Popularity contest is well written and I'm not sure what related posts plugin your running but those are known to cause long queries.

  9. #9
    Jonny is offline Hello World
    Join Date
    Apr 2010
    Posts
    11

    Default

    Personally I've had a-lot of success with WP-Super-Cache and also heard good things about W3 Total Cache as it supports CDN's.

    I would personally see if you can simply turn on GZip compression - this makes a massive difference and can often be setup through your hosting control panel. If not, try something like:

    Code:
    # BEGIN GZIP
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
    # removes some bugs
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent
    # END GZIP
    If that works, you will certainly benefit from trying out the two above plugins - they take a bit of time to setup, but do provide a massive performance boost (and allow the control of gzip compression WITHOUT the stuff above in your .htaccess file).

    You can do a-lot with server tuning, .htaccess and all sorts of clever stuff, but the above chunk works for me and has done on other servers too - if it doesn't work just delete it!

    Maybe someone else could suggest a better .htaccess compression solution?

    You could also try not having so many posts listed on your homepage, or change your theme so it just lists excerpts without all the media content.

  10. #10
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    An important point about W3 Total Cache which I'm guessing a lot of people aren't aware of, is that it is not suitable for a lot of multisite networks as it needs to be configured for each site individually. That would be okay, except that if you don't configure it, the number of database queries for every other site on the network skyrockets.

    In a nutshell: Don't use W3 Total Cache on a network unless you are prepared to set it up for EVERY site. Otherwise you will end up putting more load on the server, not less.

    WP Super Cache does not appear to have this problem. It seems to work perfectly fine straight out of the box on a multisite network.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •