• ajwalsh

    (@ajwalsh)


    Hello, I have just made a simple theme for my own personal blog, as I was interested in learning how they work. The url is andrewjwalsh.com/blog

    While everything looks fine, it is loading very slowly for me now.

    I’m not sure if this is the appropriate place to ask such as question, but I was wondering what I might do to improve this. Should I use one of the WP caching plugins? Are there any common errors I might have made in the coding? Or might it be a host or DB issue instead?

    The strange thing is I have two other blogs on the exact same hosting plan and they run much faster, and I have fewer plugins on this blog.

    I’d appreciate any ideas, and I apologize if this does not seem to be a WP issue…

Viewing 13 replies - 1 through 13 (of 13 total)
  • Chip Bennett

    (@chipbennett)

    Does your site still respond as slowly if you use another Theme, e.g. TwentyTen?

    If so, then you probably have an issue with your custom Theme.

    If not, then you have a non-Theme related problem.

    Thread Starter ajwalsh

    (@ajwalsh)

    Thanks, that’s a good idea! Today, actually my admin dashboard has been responding so slowly that I can’t even publish a new post! (Got an internal server error) I’d guess this is more than just a theme problem.

    datdesignguy

    (@datdesignguy)

    Hi Aj,

    I might recommend that you go into your wp-config.php file and temporarily set WP_DEBUG to true, then attempt to access your site with your theme activated. It could perhaps be that you’ve used some code that is stalling out.

    Turning WP_DEBUG on and loading your site will show any php errors, warnings that make for a good place to start troubleshooting your prob ??

    Also, if you’re on shared hosting and have the W3C total cache plugin running using APC Cache, that could throw the 500 error. That’s a wild guess, really, but it took me forever to figure out.

    If you have access to your servers log files, you should open the file and see if php is reporting any errors. If its apc related you’ll see something like “unable to allocate memory for pool” or something like that. Can’t remember off the top of my head.

    Hope this gives you a few more ideas. -Greg

    Thread Starter ajwalsh

    (@ajwalsh)

    Greg, thanks for the help.

    I temporarily switched to Twenty Ten and that did seem to make things run faster. And my whole problem is strange because it seems to be hit-or-miss: sometimes it loads pages fine and sometimes everything takes at least 5-10 seconds.

    I turned WP_DEBUG on and got a bunch of errors. They seemed to be all related to very common plugins (All in One SEO, Share and Follow etc) and a few deprecated functions in functions.php (which looked relatively minor):

    https://pastebin.com/K36ZuWpN

    I am rather doubtful that the plugins are the problem if it ran smoother with Twenty Ten. I don’t have any cache plugins running currently, and I’m pretty confused about what to do next.

    Thanks again for the help. My url is https://andrewjwalsh.com/blog

    Finally, I’m not sure if this is a clue but when I log to my admin screen those options take forever to load and sometimes time out.

    Alwyn Botha

    (@123milliseconds)

    >>And my whole problem is strange because it seems to be hit-or-miss: sometimes it loads pages fine and sometimes everything takes at least 5-10 seconds.

    >>Finally, I’m not sure if this is a clue but when I log to my admin screen those options take forever to load and sometimes time out.

    Both these symptoms might mean your host is overloaded and underpowered

    If you repeatedly press refresh and pages are fast and sometimes very slow; thats the cause; PHP, wp and sql works; the host is slow

    Thread Starter ajwalsh

    (@ajwalsh)

    Thanks, 123milliseconds. That makes sense why this might be the case. It’s really frustrating because I already host two other blogs on a different hosting plan of the exact same type (Godaddy Shared) and they have never had any problems with loading.

    One more thing that might be a factor: my site has a non-blog component as well, five static pages that I coded myself (https://andrewjwalsh.com). They load perfectly fast and are hosted the same. It’s only the files in the WP blog subdirectory that are slow.

    Do you think it is just an issue with my host, then, or something else, a WP issue?

    I really appreciate the help; I’ve been driving myself crazy trying to figure it out on my own!

    Thread Starter ajwalsh

    (@ajwalsh)

    Hmmmm, I may have solved it. I got rid of one plugin that I thought was a little less well-known than the others and it seems to be running fast again now.

    I’ll make sure this isn’t just temporary, but if that was the only problem, I really apologize for making so much of a fuss in this thread!

    Thread Starter ajwalsh

    (@ajwalsh)

    Sorry to keep posting so much but nope, it wasn’t such an easy fix. Just went to my blog again and it took over one minute to load even the homepage.

    Alwyn Botha

    (@123milliseconds)

    I suspect a plugin; disable them all to see if problem fixed.

    BUT then that slow plug. must cause it to be always slow, so

    create a hello world program on your server

    https://php.about.com/od/learnphp/qt/hello_world.htm

    access that MANY times via your browser; if that is VERY slow sometimes we bypassed WP so then its the webserver host

    Thread Starter ajwalsh

    (@ajwalsh)

    Thanks 123milliseconds. I just can’t get to the bottom of this.

    If it’s a problem with a plugin or WP itself, why is it only horribly slow some of the time?

    If it’s a hosting problem, then why does the rest of my site (non-WP static pages) always load fine? (https://andrewjwalsh.com loads fine, https://andrewjwalsh.com/blog is often slow…)

    I just checked on the iwebtool speed test and the blog loaded in 2.29 one time and 14.65 just a few seconds later…

    My host has not been able to provide any help. I really would like to figure out where the issue lies, but do not know how to proceed.

    Chip Bennett

    (@chipbennett)

    Static HTML pages basically don’t require any server resources (other than the HTTP handshake) to serve. Server performance with HTML pages won’t give you much of an accurate indication of server-load issues, as those will deal mainly with the SQL server and the PHP parser.

    Thread Starter ajwalsh

    (@ajwalsh)

    Sorry, I wasn’t very clear there and didn’t mean “static”. Those other pages are actually dynamic in that I use PHP include function for the header and sidebar. And since I created the WP theme using the same basic template, they are very similar code-wise.

    What I meant so say was that it isn’t a wordpress blog.

    Alwyn Botha

    (@123milliseconds)

    >>If it’s a problem with a plugin or WP itself, why is it only horribly slow some of the time?

    Temp disable all plugins.

    Reload a SAME simple posts page repeatedly; if its 7 times slower sometimes; you have now exclucded plugins from the deal.

    Unfortunately if you are on shared hosting you cannot see if SQL or something else is overload the exact time you hve VERY slow times

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Code Issues With My New Theme?’ is closed to new replies.