Tag Archives: Site Updates

A Quickie

OK, on rapid succession before I hit the bed:

  • I finished version 0.9.5 of Complexlife. It now includes support for stumbleupon and reddit, an option to simplify the settings menu by hading the extra options and some code improvements.
    This is 5 minor versions since the fork. Go me!
  • I finally added a favicon on the Division by Zer0. I wanted to do this for a while but I never got around to it and I also didn’t have anything in particular I wanted to use. Finally a guest post from Pharyngula gave me the idea to use the atheism symbol which looks cool enough.
    It took me a while to figure out what the correct code is but a little Google prayer and I got my divine answer.
  • We now have 22 Atheists in Scoutle which is pretty impressive if you consider it was only 4 days ago that I mentioned it. However the more impressive news is that found a fellow Epicurean blogger through the new network I setup. Coolness!
    So, for the rest of you who haven’t joined yet. What are you waiting for?! Git!
  • I now have an actual Comment Policy so I’d appreciate any opinions on it 😀

G’night!

Something is horribly b0rked

And I don’t have time to fix it now. A bit later. Please hold on

Update: Fixed – Phew.

I think that I will not use the AskApache plugin. Even though it looks very useful (especially since I’ve been mildly hacked once) it managed to b0rk the site twice (although I will admit that the first time it was my fault as well).

However the fact that it is so easy to break your site, even if you have some passing knowledge of web administration like me, makes it a bit dangerous for the faint of heart.

Another problem is that I couldn’t even leave a comment at the plugin’s page due to the heavy spam filtering or whatever. This is especially exasperating when your site is freaking up (not finding the admin pages and whatnot) and you’d like some support. Fortunately I managed to search for keywords and find a comment left by the author of the plugin advising how to fix my problem.

Very big Note: When the author talks about the .htaccess file. He means the .htaccess in the wp-admin/ folder not the one in your domain root. Do not touch the one in the root! I learned that the hard (or rather, the run around in panic, waving my hands around) way,

Squashing Wodrpess Performance Bugs

I think I’ve finally managed to trace down and smite all the things that were making my site so Gawd awfully slow. I had finally been annoyed enough by 30 sec loading times that I just had to do something about it.

Initially I thought it was with my host, and I did contact support about it via Email. They did check out the MySql slow logs and noticed some strange queries from BadBehaviour, but when this little plugin blocks around 1000 bots per week, it’s not worthwhile to disable it :).

In Dreamhosts’s opinion I should try and disable my plugins and then switch to another theme to check. Well, even though it was painful, I did it but it didn’t really make much of a difference. My site still seemed to be slow. However a test site I created had a quite normal speed. Perplexing

Initially I thought that it might just be the difference in DB size and indeed, my other WP sites, which have much less content that this, seemed to be loading faster (albeit slightly).

Fortunately a few google searches led me to some good content. Initally I discovered Firebug from a post explaining how it can help you diagnose WordPress performance issues. That was quite helpful to tell the truth. I managed to immediately spot that the WordPress Automatic Upgrade (WPAU) and the Popularity Contest were severely slowing down my Dashboard. I also found a few items in my theme that were just taking too long to load (like my FSF badge for some reason). Disabling them dropped the load time but I still had a problem.

You see, for some reason there is a 5-9 second loading time from the time I click on a link, to the time the page refreshes and starts to load. Firebug, unfortunately, will not give you any information on what is causing this, other than to tell you that the link is loading. It will not even take into account this initial loading time when giving you the total load time of the page (thus a page taking 13 secs will be reported as taking 4.5). Since this loading time dissapeared

This meant that I had no idea what was causing it, so back to the search I went. This time I managed to find a more interesting post on Improving WordPress performance which not only gave some great info, it linked to some other sources. Unfortunately, most of the tips given were to be used on a private server and were not really applicable to a shared hosting service like mine. Of course, this person was talking about receiving 500.000 hits a day, whereas I’m barely receiving 3000…a month. Still I applied the wp_config.php edit although it didn’t seem to make much of a difference.

My final hint came from wolfie who advised that I remove all widgets and links that point to other addresses as these may increase the loading time. I did that and I also took down the Popularity contest as well, just to see the results.

It seems it worked. The initial loading time has dropped to around 4-5 seconds. Although I don’t have as much bling in my site anymore, I am hoping that the increase in speed will make up for it. Unfortunately 4-5 secs is still quite bad and while I still don’t have any idea where to look in order to fix that, it’s at least better than 6-9 secs + 4 secs of extra stuff. With the WP-Cached page, the load seems to be instantanteous OTOH so at least that helps. Still for a ~100 hits per day, it certainly should not happen.

As an aftereffect, I decided to finally update this site to WP 2.5 as the functionality of Popularity contest was the only thing preventing it. At least I now have a snazzier Dashboard 🙂

After improving my performance I decided to also start a WordPress Performance page on the dreamhost service wiki. I would urge all of you, Dreamhost customers or not, to take a look and improve this page so that others that have similar issues can find a focal point to troubleshoot. I also hope to see tips specific for Dreamhost shared hosting customers eventually.

If there is a good WordPress improvement page or tips that I should check btw, feel free to let me know. Also, if you have any idea what causes these ~4 secs of initial loading delay, I would be really glad to hear it.

Where're my damn icons?

I don’t get it. My lifestream icons are not loading for some reason even though you will see in the page source that they are loaded as part of the class. For some reason, initially the last.fm and facebook icons stopped loading after I hacked the SimpleLife plugin to make it play with all kinds of feeds. Then, I discovered why the colours of the custom feeds were not being used (a missing colon) and fixed it, and now <a>all</a> my icons are gone…

Grrr!

Nothing I do seems to fix this and I just cannot see why it is happening. There does not seem to be an obvious error in the code and the rest of the css class (text, background colours) are loading just fine. In the source of the page, you can see the css clearly loading correclty


a.lastfm {
background: 0c0c0c url(http://dbzer0.com/wp-content/plugins/simplelife/lastfm.png) no-repeat 10px 50% !important;
border-top: 1px solid 0c0c0c !important;
border-bottom: 1px solid 0c0c0c !important;
color: #BFBFBF !important;
}

And then the item call

<li class=”item”><a href=”http://www.last.fm/music/Machinae+Supremacy/_/Stand” class=”lastfm” title=”db0’s Recently Played Tracks”><span class=”timesf”>09:48</span> Machinae Supremacy – Stand</a></li>

And the icon exists…
Anyone have any idea what is going on?

At least now I can have feeds from any source (feedburner, del.icio.us, google reader) without losing formatting. I just need to wait for the next plugin version to add options for more streams 🙂

UPDATE: Nevermind. I found the culprit. Apparently I’m blind…

Mighty plugin hacking

Well…for my newbie standards at least 😛

I’ve been playing around with the SimpleLife WordPress plugin, trying to create a simple lifestream I can embed in my about page and perhaps in my sidebar as well. It turned out that this was a job which needed a bit more attempt to make it work.

Below are the changes I did in order to wrangle it.

  • Had to edit the plugin in order to get it to diplay correctly in the plugins page. For some reason it floods the screen with it’s contents. Apparently editing and saving should solve it but in my case I needed to delete some newlines as well.
  • Changed the classes .date and .time to .datesf and .timesf and modified where they were called. Leaving them as they were, they were screwing with other css classes on my site under the same name
  • Changed the if statement for last.fm to look for the string ‘last.fm‘ instead of ‘last‘ since that string may be a part of any other url.
  • Put three new if statements, similar to the ones that check for last.fm and facebook, that check if the link goes to this blog, the ACP or the Wesnoth Journals. Then set the class according to that. The way the plugin is setup, it does not assign the class depending on the feed url bur rather according to the current link url. This means that you cannot use feedburner as your feeds address as it will never trigger an if statement[1]. I actully find the way this is handled a bit weird as it would serve much better to check the feed url and assign a class, rather than check the current link. I’ll have to check if that’s actually feasible…
  • Commented away the if statements for the first three feeds. I’m using the custom ones instead now.
  • Manually set the colour of the last two feeds within the plugin. For some reason even though the php call takes the variable I’ve set in the plugin configuration page (I can see it in the source code of the page) the colour is not being used and the text stays black. Weirdly enough, the background colour is changed well enough and the “blog feed” works just fine.
  • I didn’t want all my delicious feeds to be posted because I seem to be doing an awful lot of them. I prefer to log only the ones that signify my comments for which I use the mycomments tag. Fortunately I’ve discovered that you can use a del.icio.us tag by using the form: username/tagname
  • Created a new page template and inserted the php code there.

All-in-all, the plugin seems very promising and it already seems to work fine for me. However it does seem quite error-prone and lots of people most likely won’t be able to use it yet. Fortunately this will be fixed in the short future.

Now I just have to see if I can add more stuff for it to track.

Comment Quickly

I’ve just discovered a neat little service that allows readers who want to rate an article to quickly rate it.

I’ve now spent the last hour hacking it so that it integrates nicely with my site so currently you should see it on the single post page, on the sidebar. Hopefully this will allow people who don’t have anything specific to say on the post to simply press a button and label it as cool, insightful or fun (or on the opposite, boring, bad or just dissagree).

It should also embed itself into my feed but for some reason I doubt it will work. Oh well, we’ll just have to see 😉

Unofrtunately from the limited time I’ve used it, it seems that their servers are severely overloaded so the script most often than not does not appear at all, and when it does, it tends to appear last (after all the items in the page have loaded).

I’m still wondering where to place it as it is. By placing it on the sidebar, it means that you might miss it after you finish reading. By placing it on the bottom of the post, it’s very easy to see but it also does not merge as well as I would have liked with my site :-/

Opinions appreciated.