John Kavanagh
Indie WebDeveloper
Client-side and Front-end Development. Expert in cross-browser compatibilities, beautiful layouts, accessibility and advanced CSS/XHTML

Stop directory listing in Wordpress with htaccess

09.03.2009 0

Although this tip can (and should) be used for your normal website development as well, it is particularly relevant for WordPress websites where you’ve quite possibly paid for the theme you’re using and spent hours writing some of your plugins.

In a default WordPress installation directory listing is not protected, which means that anybody who knows you’re using WordPress can very easily gain access to your themes and plugins as shown in the screenshot below just using their internet browser and appending /wp-content/plugins/ or /wp-content/themes/ to your URL.

Read more

Auto-Compress CSS and JS with htaccess/PHP

03.03.2009 1

Auto-Compress CSS and JS with htaccess and PHP In the never-ending quest to reduce the amount of bandwidth your website uses (both to improve visitor load times and to keep your own overheads as low as possible), one of the simplest and easiest areas for improvement is often overlooked: compress your CSS and JavaScript.

Even just taking out all the erroneous white space can make a huge difference in the final size of the file. Of course, it annoys the hell out of people trying to digg through your code, but I sort of see that as an advantage too..! Of course, compressing your CSS and then having to revert back to an uncompressed version every time you want to make a change and re-compressing it again becomes a bit of a bore very quickly, so why not an automated method that will do it for you? With PHP and htaccess, it’s very, very easy.

Read more

Blocking an IP address with PHP

15.02.2009 2

There may be many reasons why you would want to block a specific IP address from access your WordPress site, or any PHP-based website (there are methods to block IP addresses in all language-based websites but in WordPress you’re using PHP, and that’s what we’re focusing on here). The main reason you would want to block access, particularly with WordPress, is to stop comment spam, or the uninvited access of an ex-employer and/or general troublemaker. If it’s your website, then it’s your appanage to allow or block people from accessing it as you see fit.

Read more

Just another WordPress weblog?

03.02.2009 0

johnkavanagh

I will happily admit that I’ve failed in trying to use WordPress twice before

With this URL having sat here with nothing more than a goofy image and an email link for almost a year, it had fallen completely off the Google radar (a quite righly too).  As things from moving house and starting a new job have calmed down now, it seemed like a good time to start a-new and make proper use of this new-fangled WordPress software. I will happily admit that I’ve failed in trying to use WordPress twice before, clearly never giving it the conviction and intent that it so obviously deserves/requires.

Now I just need to work out what all the buttons do…