blog, css, customization, hosting, icons, images, php, posts, related, site, skin, theme, thumbnails, wordpress, yarrp
Retain your visitors by using related post thumbnails!
A while ago I was doing some research into how I could better design the layout of my blog to encourage new visitors to read more posts, rather than just bouncing away (i.e. leaving after reading one post).
I already used a plug-in called YARRP (Yet Another Related Posts Plug-in), to show a list of posts that were similar to the one the reader was looking at. Although I found this blog post describing how you could customise your related posts layout to include thumbnail images for each post.
Depending on your PHP & CSS skills, the customisation could either take you 20 minutes to implement, or a whole evening. It also depends on what formatting problems your theme has would would need working around. In my case, I think it took me five hours, on and off. My CSS skills were a little rusy, and my theme had an issue which made different posts have different issues. So it took a lot of systematic experimentation to mess around with CSS margins to make sure everything stayed where it was supposed to be!
Note that you need to be self-hosting to be able to do this one.
You’ll be able to see the results of my implementation of this at the bottom of the page, and it I have noticed an objective benefit in having done this. According to Google Analytics, comparing the month before and the month after making this change, my bounce rate fell by 4.4%, my page views per visit ratio increased by 3.4%, and my average time per visit went up by 25%.
Doing this hasn’t gained me more visitors, but that’s not the point. From where ever they come, this layout change is designed to make your visitors stick around and see more of your work. Going by the above results, it really does seem to work.
So, all that’s left to say is thanks to Zach at buildinternet.com for posting about this, as it’s been a good help to me.
Share this post
address, bash, blog, change, changing, directory, dynamic, file, folder, hosted, htaccess, ip, linux, mac, osx, page, password, php, protect, restrict, script, secure, security, unix, weblog, wordpress, wp-admin
If you have a self-hosted WordPress blog, I hope that you are thinking about security. The best thing you can do is to use the automatic updates so you always have the current version of WordPress.
One of the most pernicious hacks someone can do to your blog is to access to your wp-admin folder. This folder contains the back-end PHP pages of your site where you control everything and write your posts.
Via your web-host’s control panel you might be able to password protect this directory, although that could still be brute forced. An alternative method, which is well documented (see reference links below), is to create a “
.htaccess” file in your wp-admin directory, with which you can limit access to a specific set of IP addresses. E.g. your home IP address and your work IP address. See the references below for links on how to write this.
This method is perfect for locking down and restricting who can access your admin pages without having to go through any sort of manual authentication. I held off doing this for a long time because my ISP assigns dynamic IP addresses, and my Netgear router needs frequent reboots. So my IP address changes a lot, so I’d keep getting locked out of my own blog!
To get around this, I thought of a script I could write to keep my wp-admin’s .htaccess file automatically updated! You could even use this if you took your laptop away from home and connected on another network, as your laptop will have your ssh keys installed. Try to stickto using a secure VPN though, just on principal
Sorry, it’s a bash script, so if you use Windows you’ll be stuck unless you install the cygwin environment and PuTTY. If you use a Mac, I’m sure you can switch on the bash shell.
Without further ado, here’s the script:
Note: make sure you have cURL installed first.
# Auto-update .htaccess in http://your-blog/wp-admin/
# Run this from cron on a short interval.
# This will grab your IP address, and then rewrite the
# .htaccess file and use scp to upload to your server.
# David.R.Gilson 3rd October 2009
# I distrobute this under the Creative Commons Attribution
Share Alike license.
# Grab your external IP address.
ip="$(curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//')"
# Write the file.
echo "AuthUserFile /dev/null" > htacc.txt
echo "AuthGroupFile /dev/null" >> htacc.txt
echo -e "AuthName \042Limit wp-admin access\042" >> htacc.txt
echo "AuthType Basic" >> htacc.txt
echo "<LIMIT GET>" >> htacc.txt
echo "order deny,allow" >> htacc.txt
echo "deny from all" >> htacc.txt
echo "# Whitelist home router" >> htacc.txt
echo "allow from "$ip >> htacc.txt
echo "</LIMIT>" >> htacc.txt
# Copy to server
scp htacc.txt [YOUR SSH LOGIN HERE]:"~/www/wp-admin/.htaccess"
# Clean up
Once you’ve pasted all that into a file (I named mine
htaccessupdate.sh), remember to make it executable by typing
chmod +x htaccessupdate.sh.
Share this post
anniversary, blog, blogging, website, wordpress
Happy 1st Birthday Blog!
A year ago today, my website as it is now, went live. People always say this, but it is hard to believe that a year has gone by – that I’ve actually been writing for that long. Ah, you got me, I have had a couple of breaks. Although, in that time I’ve managed to clock up over 190 posts, and with around 460 comments there’s been a lot of chat (mostly thanks to Spotify!).
Still though, this has been a fantastic experience. It is helping me to stay active and hone my writing skills. It has also helped me rediscover how much I actually enjoy writing.
There’s a few people I should thank. Nate Lanxon for suggesting that I switch to using WordPress, Ryan Hitch for hosting this site, and my mother Carol for listening to me go on about my ideas. I’d also like to thank everyone who regularly reads me (you’re an exclusive group!) and who has linked to me over the past year.
What’s for the next 12 months? I am going to continue to cover the same general topics as I do already. I’m planning that Tip of the week will close at the end of the 2009, but I’m hoping to write more hardware and software reviews. Tips may come back in a less frequent but more in-depth form. I am hoping that I can develop writing relationships with other sites too, so you may find that I have less actual posts on here, but instead posting links to what I’ve written elsewhere. All this is subject to change
Once again, thanks for reading and supporting me.
Share this post
backup, server, upgrade, wordpress
Okay so what the heck happened to the site on Thursday night?
It all boiled down to running out of storage quota on my server. My server account had crept over its quota limit without me knowing. Things were still working like this, but since WordPress 2.8 (the software that runs this website) came out on Thursday I ran the upgrade, and then we hit problems.
Anyway, lots of technical details later storage quota was extended and the site was put back as it was, and subsequently upgrade to WP 2.8.
Why am I telling you all this? Well the moral of the story is that no matter what you’re doing – keep backups of everything you do! Had I not had backups of this site, it would be trashed now. Moreover, had my backups been better organised, the site would have been up several hours sooner.
I’ve now improved my file backup procedures to be automatic so they’re always up to date. Fortunately, I was already using a WordPress plugin which e-mailed me a daily backup of my database.
Make sure you keep your stuff backed up too.
Share this post
favicon, icon, RSS, sidebar, socialnetworking, wordpress, wordpress-plugins
Okay folks, I know I’ve broken with my regular posting schedule, sorry!
However, I haven’t abandoned things; I’ve been busying myself with making some subtle changes to the looks of the site. This post is more for myself than anything, as a record of what I’ve done. Also, I’d like to thank my friend and server admin, Ryan, for suggesting most of the things I’ve done to the site.
Header - before
Header - after
I’ve done two things to the header, and I’m very pleased with both.
First of all, I’ve created a search box (one less widget to put on the sidebar). I also created a custom background for the text box so that it fitted in with the theme design. The submit button looks like text, although it is actually an image of text. This is because no matter how I set the style of the basic button, I could not get rid of the edge shading effect. So instead I made some text in the same font as the page links, and used it as an image.
Secondly, I changed the RSS link. Before it was a simple line of text with an RSS icon. Although now, I have taken the Feedburner counter that was on my social networks widget and put that in place. Then also, I have replaced the standard RSS icon with one lovingly drawn by yours truely.
Custom social networking widgets
I have dropped several unnecessary widgets, including my free-form text boxes with the QR codes and campaign badges. I’ve added a collapsible archive widget, I wanted to have a collapsible category widget too, although I just could not find one that worked properly, shame!
My “social networking” (a simple Text WP widget) has gone back to the original version – a collection of favicons. The first time I had it like that, I eventually dropped it as I thought it too much work to keep maintained. I still feel that way although I developed a spreadsheet to help me manage all the lines of text. So now, I just enter any new social networks into the spreadsheet, and then copy-paste the final cell of the sheet into my text box.
After having such a massive traffic spike last week (1,432 visitors!), I thought I should put up a “most popular” widget (rather than just a recent posts widget). It took a lot of experimenting to find a plugin that worked the way I wanted it to. I ended up settling with a plugin called Recently Popular. I also modified my Twitter Widget to show my Twitter counter. With these changes, I didn’t loose the counters I had in my social networks widget, but instead distrobuted them around the page!
Finally, just to try and save on more space, I have reduced the line height and font size (1.1em & 90% respectively).
The great spike of January 10th 2009
I didn’t finish reporting my traffic surge properly, but I just thought I’d show the spike before I let anymore time slip by. I’m dissappointed things have slipped back to normal, but there is a small improvement on my mean daily visitors, and I’m hoping to get writing more soon to pull more people in from search engines. (Chart created by Piwik.)
Share this post