web site optimization.

The last few days I became obsessed with optimizing jappler.com. It was loading slower and slower with what seemed to be every passing day. Since I had originally designed my web site for an earlier version of WordPress, I figured it was about time for a tune up. I went to the ever-so-helpful codex, to help me figure out what was going on. I went through a number of different steps to troubleshoot the problem and I thought the steps I took might be helpful to others.

  • Is it my host or my site? At first I thought it was a slow host. I had friends from around the country access my web site, and confirm the problem existed for everyone. From all the feedback, I confirmed something was going on. Now it was time to take it to the next step. Was my host slow or was my web site slow? To check this, I grabbed a recent backup and restored it to my desktop to check it out. Once I had everything in place, I hit my web site and it still seemed slow, so I asked Ken to give it a try. He confirmed it was still slow. It was not the host that was slow.
  • Is it my template/XHTML/CSS/graphics that is slow?
    Now it was time to revalidate my XHTML and CSS via W3C. I caught a few errors, but nothing major. I also took a look at my graphics’ sizes…nothing too hideous. I even had a few graphics (Get FireFox, etc) that were being pulled from a remote location…I put an end to that. I then reconfirmed that the site was still slow so I decided to turn to my favorite part about FireFox the Web Developer extension. Under the tools menu, I viewed my site’s speed report via http://www.websiteoptimization.com. I was able to look at everything that was loading from my site, make sure CSS decisions (break up my CSS into a few different files, and then do some minor changes to reduce my HTTP requests from 63 to 36. How? This is where I started getting into some database optimization.
  • MySQL issues? Since everything is page is created dynamically, it was time to shift the focus on the database.
    • Table optimization.
    • I first read about the option to optimize tables, so I logged into phpMyAdmin and optimized all my WordPress tables. I once again did some more performance testing on my site and yet again, no luck…it was still slow. Time for my next hypothesis.

    • Slow queries. I found out that MySQL has the ability to log slow queries by adding log-slow-queries=/var/log/mysql/mysql-slow.log and then defining the slow query variable set-variable = long_query_time=2 in the /etc/my.conf file. (This is not created by default.) Once you have made changes to the my.conf file, you will need to stop/start MySQL. Now to look at the slow queries…simply tail -f your log. (for me: tail -f /var/log/mysql/slow-queries.log) Once again, with some testing (browsing) of my web site, I did not find any queries that stood out.
  • Back to the jappler template: One div at a time. Back to the codex I went searching for tips, examples, etc. What else could be the problem? Time to go through what I know.
    • I have ruled out a slow host.
    • My XHTML and CSS validate (or have only a minor issue with one of my IE tricks, but when I use the default WP theme my pages load fine.
    • I have stripped out the right hand column and the footer to localize the problem to the main part of the page so those parts of the pages are fine.
    • I have disabled and then re-enabled all the WP plugins one at a time (and deleted a number of them)
    • I have optimized my MySQL tables. I have looked at slow queries coming from my theme.

    At this point I did not see too many options other than recreating my templates over one div at a time. Div by div I recreated and tested my web site. (header loads ok…time to add the menu….menu loads ok with header…time to add content. Eventually through enough testing (and some wild plugins) I tracked down the problem…more like problems and started testing multiple templates.

  • What’s left as of today? I still need to work on my index.php to make it load a little quicker. Something is still not happy there. I also need to figure out what is not happy with the news page. Other than that…even though it was a stressful few weeks, I can walk away happy because I learned a lot.
  • Summary.

  • When issues arise, try to pinpoint the problem as much as possible by asking yourself questions.
  • Validate your HTML/XHTML/CSS. Clean code is a good thing.
  • If you are using themes/templates, try a default template.
  • Make use of the Web Developer extension for FireFox.
  • Take a look at your site’s speed report via http://www.websiteoptimization.com.
  • Back up often!! (I just had to slip this in)
  • Be on the lookout for rogue plugins and watch your queries.
  • Don’t give up!

[tags]optimization[/tags]

optimaztion time.

Well, it has been awhile since I have done any maintenance on jappler.com and over the last few weeks, I have noticed a bit of a slow down when the pages load. I took some time today to look at the php code, style sheets, templates, etc and have at least tracked down the problem…somewhat. My site flies with other WordPress templates, but there is something about mine that WordPress does not like. I had originally designed my template for an earlier version of WordPress and I guess it is time I update it. Please bare with my site slowness for a little while longer. My stylesheets and HTML all validate, now I just need to figure out what in my WP code is slowing everything down.
[tags]optimization[/tags]

ken.jappler.com

Well, well. Ken and I often play Yahoo! Pool and to make things interesting, I thought we could play a best of 3, winner gets some sort of web service (coding/design, etc) from the loser. I played a good first game, but Ken went 2-0, causing me to create and set up: ken.jappler.com. Do not worry, I plan to win today, and since Ken is a Zen Certified Engineer, you know I will get something good. 😉
[tags]Ken Pesanka, blog[/tags]

web hosts, the journey continues.

Ken often asks me: “what is the first thing you would do if you won the lottery?”. The last time he asked I told him I would take a cab to a Land Rover dealer and buy myself a Range Rover. I would like to continue my response to add that I would then drive home and go to apple.com and buy three Xserves. Two for web servers (one main, one failover) and the other Xserve as a development server or backup server (or game server). I would drive my new Range Rover with the Xserves in the back to a data center and then strip off Mac OS X Server, put Mac OS X client on them, call all my friends and tell them I will host whatever they want for free, and then of course talk to my financial advisor. So my point to all of this? I hate 99% of web hosts out there. I have been through several. I am tired, so I will not go into detail, but ServInt sucks. Unreliable, unreliable, unreliable. They claim they “manage” VPS systems, but it is far from managed. Both Ken and I had major problems, and the support was very unhelpful as well. Bullshit responses, slow repsonses, or no responses at all. Stay away from ServInt! Where am I now? Back with the most reliable host I have had to date…Host Gator.
[tags]web hosts, jappler.com, Host Gator, Xserve, Ken, Range Rover[/tags]

jappler dashboard widget updated.

widget

After a few months of using my jappler.com dashboard widget, I decided I needed to update it ever so slightly to take longer post names into consideration. Download the Jappler.com Dashboard widget. Once things slow down a little, I am going to look into how to create a widget for Konfabulator so both Windows and Mac users can enjoy my widget.

[tags]jappler.com, dashboard, widget[/tags]

a new day, another host.

Jappler.com will be moving to a new host ASAP. I have been moving hosts for awhile now…and thought I had a good one: hostgator.com. After some downtime and idiotic conversation with the “support”, I decided I deserved better and needed to be able to take more responsiblity for my web presence. I decided to go, upon recommendation from Ken, to ServInt (the people that fark.com use)
[tags]web hosts, jappler.com, ServInt[/tags]

jappler.com dashboard widget!

Time to take things to the next level…my love for (Mac OS X 10.4 + Web Development) = Dashboard widget creation time. When I first got my hands on

Mac OS X 10.4, I was not too crazy about Dashboard, but after WWDC I started to like it more and more. I wanted to start off with a simple widget, so I decided that it would be cool to have a widget that would display the past 10 jappler.com posts while also having the option to search old posts/pages. I have a few other plans in mind for other widgets, but until then, check out my very own widget: Jappler.com Dashboard widget.

Disclaimer: Use the jappler.com dashboard widget at your own risk. I am not responsible for any data loss, productivity loss, global warming, etc that this widget might cause.

jappler.com: database driven (finally)!

wordpress For years I have been searching for a web site solution that would fit my needs:

  • easy to change and edit content (via any web browser)
  • integrated blog
  • integrated search
  • easy to maintain
  • database driven
  • templates
  • able to adapt to mobile technologies

I have played with many CMSes over the years, and I finally realized the power of Plone, but your average hosting company does not offer plone hosting. None of the other CMSes really appealed to me because I had to do so many customizations, and I really don’t have any membership needs, so I decided to look elsewhere for a solution. In my mind I had two options: home made CMS or to do something with my beloved WordPress install. I decided to follow Alex King and to use WordPress to drive my entire web site. I have used a number of plugins, mod_rewrite rules, and some customizations to make it all possible, but so far I am very happy with how everything turned out. I have made several changes so far to multiple pages via my web browser, I looked at my blog via my phone on the train this morning, and am still able to write my blog like I have been for the last year (almost). I had to make a few changes to some plugins to make everything work together, but I learned a lot. I also am very thankful for the documentation available which allowed me to add a lot more flexibility and features in my templates. Perhaps if there is interest, I will break down everything I did so others can do the same.
[tags]jappler.com, WordPress, CMS, Alex King[/tags]

jappler.com v6 upcoming

My posts have been more sporatic than usual because once again, I got the CSS bug…the need to redo the site I have now to be cleaner with a brand new backend. I am hoping to have the design and backend completely done in the next two days. I have at least 3-4 more hours gettint the CSS in place so that it looks good on Opera for PC/Mac, IE for Mac/PC, Firefox on Linux (and my Mac), Safari, and Netscape for Mac/PC.
Once the new design is in place, I will explain more, but until then, back to coding.
[tags]jappler.com[/tags]

excuse the dust, updated to WP 1.5.

I updated my installation of WordPress to 1.5, and am still working out some problems with some of the plugins that have not been updated yet. I am hoping to get everything working ASAP, but until then, you might notice a few things are a little funky (like my photos). I have also been going through my plugins and trying to add more functionality, so stay tuned!
[tags]WordPress[/tags]