• Let’s get a thread started to share tips about how to optimize load time. This is a major issue for my blog – sometimes it loads in a second, sometimes in 50+ seconds, and I don’t know why. But I can imagine how it might happen with all those database queries. Please share your tips and, as I tinker with the code, I’ll share mine too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think load times mainly come down to the web server load.
    On a server that hardly any load, I would imagine a WP site to render in less than 5 seconds. On a heavy loaded server, obviously I would expect this number to increase.
    On average, WP sites render around 3-4 seconds on my two servers.
    AMD Athlon 1Ghz / 640Mb Ram / 80 GB HDD
    AMD Athlon 1.3Ghz / 768 Mb Ram / 120 GB HDD
    Both servers act as mail servers (each hosting at least 3 domains), they also run spam filtering, shell access, etc.
    I’m quite lucky to be able to host my own web servers at home therefore I have total control over them.
    I’ve not made any changes to my WP database schema either, it’s pretty bog standard expect for a small change in the _users table, which logs the time/date that user last logged onto the site.
    One thing you may be able to do is optimise your DB tables;
    OPTIMIZE TABLE blacklist , wp_categories , wp_comments , wp_linkcategories , wp_links , wp_optiongroup_options , wp_optiongroups , wp_options , wp_optiontypes , wp_optionvalues , wp_post2cat , wp_postmeta , wp_posts , wp_users
    This can sometimes speed things up.

    Thread Starter joe_doufu

    (@joe_doufu)

    I am thinking the key to optimizing the load time is to hard-code some of the “options” so that WP doesn’t have to check the database for each optional feature. Also I may replace my “blogroll” with a hard-coded server side include, because it’s pretty rare that I’ll add something to it, and I’m good enough with HTML to make the occasional addition. That’ll save at least one database query.

    Moderator James Huff

    (@macmanx)

    It all comes down to how dynamic PHP is. As long as you can live with the load time, it’s good. At least this isn’t like MovableType where you have to rebuild after you do everything.

    If you have a lot of plugins, and your database server is a different box, the amount of database hits can start to add up.
    Also, if you have plugins that go to external sources frequently without caching, maybe a weather plugin, or an amazon plugin, that can cause big stalls in load time.
    -d
    CHAITGEAR

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Optimizing load time thread’ is closed to new replies.