Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Speed of blog is too slow WordPress


I recently re-designed my blog:

Sometimes the blog really lags - it seems to get hung up once in a while and I'd like to solve this problem. I've removed all plug-ins I'm not using and also installed the W3 Total Cache (not sure if it's configured correctly).

Ideally I'd like a higher grade based on my YSlow score. Currently an "C". I can create the css sprite if that helps, but I'm sure other areas can be improved.


Answers (7)


Chris Bavota answers:

I wrote an article about speeding up your blog just a little while ago.

Right off the bat, though, I would suggest seeing if your server support gzip, so you can actually start to cache your pages correctly. Those Twitter buttons you are using are causing the same JavaScript file to have to load 5 times. On top of that, you have 7 other JS files. Try combining them all. Same goes for your CSS. This will reduce the number of HTTP requests.

Take a look at this tool to see how the files are loading and which ones are really large.

Louis Gubitosi comments:

I'm trying to install wp super cache but I don't think I'm configuring it correctly. All this .htaccess stuff isn't my specialty...

Louis Gubitosi comments:

wait, I think I got something. It looks a little faster but not 100%, can you suggest what to do next?

Chris Bavota comments:

The site seems to load a bit faster but you still need to look at adding expired headers, combining your JavaScript files, and inquiring about whether or not you can use gzip on your server to actually cache your page correctly.


Michael Fields answers:

I would suggest that before you do any "front-end" optimization that you install and configure wp total cache:

From the report generated by Chrome's console, most of the wait (about 14 seconds worth) is coming from the generation of the homepage itself. Even if you move all js and images into one file, you will not drastically see any difference. IMO you should start with server-side caching and then work on the HTTP stuff.

Louis Gubitosi comments:

I agree to do server side first. I actually uninstalled wp total cache and installed wp super cache. Any differences?

Michael Fields comments:

Honestly, I would not know. I've always used wp total cache after reading a ton of articles which suggested it over the other plugins. Not super how super performs, but I was really impressed with total cache and would use it again in the future.

Louis Gubitosi comments:

Hey Michael, can you give me a hand with the configuration? I installed wp total cache but the site is still very slow:


Rashad Aliyev answers:

Hello, Now you're using WP-Super-Cache. Please disable it for a while and put this codes to your site.

Put this your wp-config.php
define('SAVEQUERIES', true);

Put it to your footer.php before the </body> tag.

<!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->

Then you'll know how many query you've and how slow your website.

And view your blog source (right click and view source) send me details.

best regards,

Rashad Aliyev comments:

As you send me your query result. That mean your site very very slow.

Suggestion before to using any caching plugin: You should know to which query will increase your time for getting information.

For special request you should increase your prise.


Jonah Schulte answers:

Try disabling Permalinks on your blog to see if that speeds it up. I suspect it will make a big difference.

Jonah Schulte comments:

For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text "page slug" as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post's permalink structure such as /%year%/%post_name%/ or even /posts/%post_name/. (Some people recommend /%post_id%/%post_name%/ which works for performance reasons but others recommend against it because it is unfriendly to users in the many contexts in which users interact with URLs.)

Here are some links with more information about how to solve this issue:

Let me know if this helps!


Jonah Schulte comments:

By the way, I really like the design of your site! Very nice.

Louis Gubitosi comments:

I'm glad you like it, now only if it was fast! thanks Jonah but that didn't work. I tried using /%year%/%monthnum%/%postname%/ and the site was still very slow. thanks for taking a stab.

Jonah Schulte comments:

Did you try disabling the permalinks entirely to see if it made a difference? It may not be the solution, just worth a shot.

Chris Bavota is right as well regarding the JS files... if you combine and minify them it will help a lot. It also helps the speed if you load all of the JS at the bottom of your pages instead of the top, but that does require some shuffling around of javascript to make it work the same when loaded in that way.


John Cotton answers:

CSS sprites would definitely help (this is a good tool [[LINK href=""]][[/LINK]]).

Combing CSS and JS files also - anything that reduces the number of trips to the server.

Create a sub-domain for hard-coded content so that the browser can make more requests in parallel - or better still, stick it on a CDN.

Use some jQuery to dynamically add a class after loading so that the fonts get loaded after the rest of the page is done (it will feel quicker if not actually be quicker).

You could use similar technique the twitter and gravatar icons - padding the spots with a filler image and then load with js on document ready.

But those things shouldn't be necessary if your server is running well. Are files gZIPped? Is your caching right? Is your DB server on the same machine as the web server? (That might be a bottleneck either way too much load on the server, or too slow a connection between the two machines). A ping to your server averaged around 200ms from here in the UK - not hugely fast. Could be the machine, could be the connection....


Denzel Chia answers:


You will be surprise that your site loads much faster if you remove twitter buttons and widget.
Do you really need them? I don't think so, because if your article is good, reader will tweet it themselves.

You had installed wp super cache and your cache is generated at 30.432 seconds, that is too slow.
My site is generated at 0.348 seconds as my sites design is much simpler than yours.

You should enable gzip for your wp super cache as well as set it to enable preload cache. This will let wp super cache generate cache pages before any visitors sees your website. And gzip will compress and delivers your site to browser much faster.

Hope it helps!

Louis Gubitosi comments:

I just enabled gzip and enabled preload cache and the blog is still slow...

Louis Gubitosi comments:

<!-- Dynamic page generated in 44.319 seconds. -->
<!-- Live page served on 2011-02-08 11:48:39 -->
<!-- Compression = gzip -->

Denzel Chia comments:


Seems like your site loads much faster without wp super cache.
It could have been due to wrong setting in wp super cache or you probably did not update the .htaccess rules, and use mod_rewrite setting.

Anyway, now your blog is loading 0.624 seconds, which is less than 1 second. This is consider very fast. It is not going to be much faster than this even if you use wp super cache.

If I am not wrong you are on a shared hosting, and if sometimes your site takes forever to load, it is due to the shared hosting busy handling requests or it could be due to shared hosting server hardware too old and malfunctioning. You are not going to be able to do anything about this issues.

Dedicated IP can also help speed up loading time, because it "goes direct" to your hosting account.
Sometimes you wonder why loading time is less than 1 second but actually has to wait more than that? It is because the time showed is time taken to get data from database and does not include time for hosting server to resolve your request and time taken for data to travel from hosting server to your web browser and display for you.

So besides speeding up database queries, you can minimize request time by subscribing a dedicated IP. You can also see your error log through your cPanel. If there is any, you should resolve it to prevent further time wasted.

I am using shared hosting with a dedicated IP, and wp super cache plugin.

Hope this information is of any help to you.

Louis Gubitosi comments:

thanks for the response. Tonight I contacted my hosting (godaddy) and they said I was on legacy hosting which they don't offer any more - and managed to not automatically upgrade me. I called and they moved me to Grid Hosting (which is what they start everyone off on now) for $0 charge. Not sure why I had to call them to make this change, but it looks like everything is fixed now.

<!-- Dynamic page generated in 0.360 seconds. -->
<!-- Live page served on 2011-02-08 22:15:07 -->
<!-- Compression = gzip -->

Denzel Chia comments:


Glad to hear that your web hosting service fixed your problem.

Do you mind to award the price money now?



jonnyjaniero answers:

@Louis Gubitosi

there is so much to site speed, a $10 dollar question can only set you in the right direction.

must say, it is a very good looking site. really is. i echo most of what has already been mentioned.
the deal-breaker is shared hosting, you'll always be limited.

the site has increased in speed since disabling super-cache. but used correctly, it will speed you site up.

if this was my site,
disable plugins inline stylesheets and add to main style.css
do the same for inline javascript.
this can be achieved via your functions.php file.
far too many avoidable http requests.

hosting my jquery direct from google.
all scripts to load at the bottom of page and not top (recommended for site speed) and enqueue correctly.

delete existing cache and unistall plugin.
reinstall super-cache but fine-tune settings.
manual insert the correct rules into .htacess.
add gzip directly (not via plugin)
add expire headers. clear etags.

i can do the following but obviously, not for $10. if you like to get hold of me
i'm at jonnyjaniero(at)gmail(dot)com

Louis Gubitosi comments:

I updated my hosting and that seemed to fix it, see above - thanks for the response and compliment.