How to digg-proof your WordPress blog
Every blogger hopes to be able to say some day to his friends: “I got Dugg!”.
It means you’ve written something special that a lot of other people are interested in and it gives you a big ego boost. But there won’t be much to enjoy when your server can’t handle the extra work.
In this post I’ll try to explain some measures you can take to be ready for when “The Big Digg” arrives at your blog’s door step. I’ll focus on WordPress in particular here, because that’s what I’m using. However, the concepts I’ll show you can be applied to any web site.
There are a few things you can do to survive when you get Dugg. The key to my tips here is that you can implement them at (almost) no cost in advance of getting dugg.
more »
apache apache2 mod_rewrite permalinks rewrite Wordpress
by Ariejan de Vroom
leave a comment
Permanently redirect WordPress pages
After my trip to Mephisto some time back, I noticed that some pages were accessible from different URLs. After moving back to WordPress, these permalinks no longer work.
I’m running WordPress with Apache2, so it shouldn’t be too hard redirect those old permalinks to their new locations. (That’s what rewriting is all about anyway).
Here is the default .htaccess file generated by WordPress:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressAs I said, it’s generated by WordPress. It would be very unwise to edit this, because our changes might get lost in the future.
The solution is simple. Add another block above the generated one that does permanent redirects. In this example I rewrite pages/svnsheet to http://ariejan.net/svncheatsheet.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pages/svnsheet$ http://ariejan.net/svncheatsheet [R=301,L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressFYI, the R=301 means the browser (or search bot) receives a “Moved Permanently” message. L means this is the last rewrite rule to read.
Of course, you can go nuts and add all sorts of funky regular expressions to rewrite URLs.
The nice thing is that WordPress will only replaces the block between the BEGIN and END tags, keeping your rewrites in tact.
Note: don’t forget to restart apache if your rewrites don’t seem to work.
Here we go again: WordPress 2.5
Okay, here we go then. I’ve managed to drop Mephisto after only a few weeks of service.
As a Rails developer, I liked the idea of running my own blog on something Rails. However, Mephisto was a big disappointment. Especially compared to WordPress 2.5. Mephisto has been on life support for quite a while now, and it’s just too complex to be easy to hack. Now, don’t get me wrong. I love hacking Ruby, but not too much on my blog. It “should just work”.
The reason I skipped to Mephisto in the first place was that my Wordpress 2.3 blog was very slow. I managed to track down the problem to the Twitter plugin, which was next to useless anyway.
Now, with all the new funky stuff in 2.5, I switched back. I haven’t managed to write anything substantial in the past weeks anyway, so it wasn’t a problem to loose one post.
There are many reasons for my not posting substantial stuff lately. One of them being my new hobby: photography (link). Check out my Flickr page and let me know what you think of my more recent photos.
So long for now. Expect more from me soon.
Wordpress 2.3 released!
Today Wordpress 2.3 was released (see the release notes). I’ve already updated Ariejan.net, of course, and I’m now able to use all of the following neat new features:
- Tagging (you can convert your categories to tags if you like)
- Update Notifications when new versions of your plugins or WordPress are released
- Improved post and draft management
- Mark articles as ‘pending review’
- A new and improved visual editor (which doesn’t suck! Wow!)
I highly recommend you check out the the current WordPress release from SVN. This will make future updates very easy. Read more on that here.
So, go ahead, grab that new WordPress!
Wordpress Plugin: AutoFlickr 1.0
This post announces my first Wordpress Plugin: AutoFlickr.
What does it do?
When enabled, AutoFlickr will automatically find and insert one ore more photos that are related to the content of your post. Photos are found and hosted on Flickr.
Features
- Automatically insert one or more photos
- Customizable (photo size, number of photos and type of search).
- Option to select what pages to automatically show photos.
Updates: Wordpress 2.1, Themes and Social
You can’t really see it, but Ariejan.net has been upgraded to Wordpress 2.1. I’ve been running 2.1 beta’s on a private server for some time now, so there weren’t any surprises during the upgrade.
I’ve also updated the theme to something more stylish and sober. Google Ads are less annoying now and merge nicely with the content. I’ve also re-enabled the social bookmark links so you can quickly bookmark articles on Del.icio.us or Digg.
Hope you like the new style. Some minor tweaks will be applied the following days where needed. Please let me know your thoughts on ariejan.net!
more »
WordPress: Author comment highlighting
I’ve seen it lots of times before, but I just added it to Ariejan.net (and the next release of the iAriejan theme). Sometimes there are lots of comments and it’s nice for visitors to see what the official reaction of the blog author is.
Since I haven’t really looked into a plugin or anything, this is just a very simple theme hack.
You can apply it to your current theme with almost no effort at all.
more »
Plugins used on Ariejan.net
After I released iAriejan I got some questions about what plugins I run on Ariejan.net. So, upon your request, here is the full listing.
I’ve included links to all the sites where you can download the plugins.
Note that iAriejan comes bundeled with WP Wetfloor and AJAX Comments.
more »
Welcome to Ariejan.net
Well, it has happened to me. Although I make regular backups of my site, this time I was screwed!
Since I’m very interested in Ruby on Rails, I gave a RoR weblog, TypoSphere, a try. I exported my entire Wordpress blog to typo and I was a happy man. Until disaster struck…
more »
