WordPress SLOW, tried everything!

I have read every wordpress solution and tried them all (at least most), but I CAN NOT get my site to run faster. I am using the couponpress theme, which is a coupon listing theme where users can list different offers and coupons. I’m finished customizing it but I’m having real speed issue!

I included a query count and load time function in the footer of my site and the site runs 40-52 queries and loads in 4-8 seconds (depends on page), too many queries and too slow for comfort. I would like to get the speed to down to at least 2 seconds. I looked into the queries being ran and one in particular, the “wp_schedule_event,” is generating an extremely large query, but not sure how to reduce it or eliminate it. I searched for any references to this function but I don’t know what to do.

Read More

I have tried different plugins and either they don’t work as expected or they crash my site.

Main plugins Ive tried:

  • W3 Total Cache (Didn’t work as expected)
  • WP Super Cache (Didn’t work as expected)
  • Autoptimize (crashed)
  • WP Minify (crashed)

W3 Total Cache had the best results, but I couldn’t understand the cache settings and some of my changes to the site were not being applied, so I deactivated it. I know that I have to clear the cache for changes to take effect, but since users to my site will be always be adding new listing, I don’t know if the cache settings will allow their listings to display properly or at all for that matter. WP Super Cache didn’t crash my site at first, but when I changed some settings I did not see any increase in speed. The other two seemed promising but for one reason or another crashed my site. There are probably conflicts between plugins and with some existing code, but I can’t pin point the cause.

Using firefox, I ran firebug and used the net console to see what processes are being ran on the different pages and the initial load to the domain is taking a long time to load, average 7-9 seconds. Most of this time is the “waiting” part of the process. I researched solutions to reducing this waiting time but can’t increase the speed.

I really want to speed up my site and I need some major help with this. I have been struggling for the past week trying different options but nothing seems to make it faster. If you need to check out the site here it is.

Thanks a lot, I appreciate any advice with this.

Related posts

Leave a Reply

5 comments

  1. I could be wrong, but I don’t think your queries are the problem here. Seeing the result “36 queries in 8.291 seconds” is scary, but that only measures the time in between the start of the first query and the completion of the last query. There are a lot of other things in there slowing your page loads down. If you want to see how much time your queries are actually taking up, try this:

    Add this line to your wp-config.php:

    define( "SAVEQUERIES", true );
    

    And output the actual query history in your footer:

    echo "<!--- rn";
    global $wpdb;
    var_dump( $wpdb->queries );
    echo "rn--->";
    

    Then you can view the source of your page and see if any of the queries are actually taking an inordinate amount of time.

    Looking at your page with Yslow enabled, it looks to me like the biggest time-consumer is the image resizing that’s being done on all of the post images. On my load of the site, it looks like each of those images is taking between .3 and 1.25 seconds to load, and you have 6 of them on your home page.

    Plus, it looks like they’re being generated dynamically in your theme files, with the query string argument ?&w=300, which will prevent them from being cached. And – on top of that – they’re being resized again in the browser to 115×80, adding a further slowdown.

    My advice is: start by tweaking the image display functions of your theme. Add an additional image size to your theme, so that the image is being resized when its initially uploaded, instead of being resized on every pageview. If that doesn’t help, install Yslow and go through the prompts it gives you. Tweaking the headers and etags on images (through htaccess) can allow images to be cached that are otherwise force-loaded on every page view.

    UPDATE

    Also – you’re loading several different versions of jquery – the one bundled with WordPress (probably called by one of your plugins), one from google API, and one bundled with your theme. You’ll have to untangle all of that mess and make sure all your various components use proper procedure for enqueueing scripts etc… I don’t envy you

  2. This probably deserves a much longer answer, but in a nutshell:

    You need to determine what is making your site ‘slow’

    Is it a simple a badly designed theme? You can figure this out by using http://developer.yahoo.com/yslow/ to find out which parts of the HTML/JS can be optimised. This is the most visible effect of speed, simply spending time cleaning this up can make the site render pages much much quicker.

    Once you’ve fixed up your theme (aim for A grade) you can next look towards the server.

    Are you allowing browsers to cache resources so they don’t have to request them again? Simply setting the correct headers ensures that CSS and JS don’t have to be re-downloaded for each pageview,

    Is it generating the pages which is taking a long time or getting the information to serve those pages. Is your server at high load, does it have available memory?

    For example, it might be that your server is too slow to generate the pages quickly, you might want to install APC Cache which will cache the output from the page, so it can be quickly regenerated next time.

    Second it might be the database which is really slow, so you might want to look at using Memcached so speed up reads. Once a SQL query has been done one, it is stored in memory so it can easily be read.

    W3 Total Cache is the better out of those plugins as it allows you pick different solutions to solving those problem, anything from file based storage, to APC and Memcached.

    You might also want to look at geographically placing your server closer to where your users are or you might want to look at using a cache server in front of your site to speed things up like Varnish.

    In short: There are lots of different ways to ‘fix’ this problem, there is no magic bullet, you need to take measurements, do investigations and fix each problem one by one. Start with the HTML, then look towards the server.

  3. I’m no expert but using the permalink structure you have on a large site can cause problems (you should start the permalink with date or postid etc) rather than something text based. Do you have many posts?