Tuesday, 30 April 2013

Wordpress Installation Checklist

I've just knocked myself up a quick checklist for when I started a brand new Wordpress Install. I think its worthy of recording in the ether.


> Activate Akismet if not then 'Disable Comments'
> Configure Permalinks
> Add Gravatar ( only needed for a site with comments enabled )


> Do not use wp_ as a database prefix. Doing so will only aid hackers.
> Remove the WordPress version from the website’s header. how to remove wordpress version from header ->
in this blog he says you don't need to worry about this if you have the latest version. However I would anyway, as at somepoint you may well not update as soon as a Wordpress Release comes out.
THIS IS A CHANGE IN FUNCTION.PHP so will be done after Theme is installed.

> Remove Admin username. ->
> Chmod the security of the directories to 755 and files to 644


WP Security Scan
WPZOOM - for mobile devices
DIgg Digg - floating social bar.
Jet Pack - Does it all.
Contact Form 7
Breadcrumb NavXT
PHP Code Widget - So usefull for PHP developers; allowing to add PHP in any widget space
WP-DBMANAGER - access the database from the home of your Admin area.

Next you should check The THEME checklist before Theme installation

wordpress admin allow search engines in wordpress 3.5.1

This is is admin > Settings > and then look for Search engine visibility.

Monday, 29 April 2013

My Wordpress Theme has a TimThumb script that i can't get to work

My Wordpress Theme has a TimThumb script that i can't get to work - Now What !! Having a look around the web it seems I'm not the only one that seems to have been struggling with getting the TimThumb script to work. Tim Thumb Issue Well here's my hack for a theme when all was lost. This is the code I had in the theme that called up the Tim Thumb script. Here's the call up from the template.
echo themex_thumbnail($post->ID,738);
And then the function in the templates functions.php
function themex_thumbnail($ID, $w = 0, $h = 0){
 global $blog_id;
 $src = wp_get_attachment_url( get_post_thumbnail_id($ID) );

 if (isset($blog_id) && $blog_id > 0) {
  $imageParts = explode('/files/', $src);
  if (isset($imageParts[1])) {
   $src = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];

 $url = THEMEX_URI.'extensions/timthumb/timthumb.php?src='.urlencode($src);
 if($w = intval($w)){
  if($h!=0 && $h=intval($h)) { 
  } else {
 return $url;
Here's the call up I've replaced with
echo lrip_gallery_thumbnail($post->ID,'blog');
And the following function. You can add all your different sizes to this list, and change the 'blog' call up; for example 'small' !
unction lrip_gallery_thumbnail($ID,$size){  
 global $blog_id;
 $src = wp_get_attachment_url( get_post_thumbnail_id($ID) );
// going to explode using .jpg and fix on a new ending 
 $img_url_array = explode('.jpg', $src);
 if ($size=='small'){
 $img_url = $img_url_array[0].'-150x150.jpg';
 } elseif($size=='blog'){
 $img_url = $img_url_array[0].'-738x415.jpg';
 }else {
 $img_url = $src;
 return $img_url; 
As well as making a copy at the right size and with '-738x415' add to the end of the filename; we also need to make it so the Wordpress automatically makes additional sized images. Its pretty simple all you need to do is add this to the main function.php

add_image_size( '738x415', 738, 415, true );
the first part is the name reference. It'll stick the size on the end anyway. And then comes the sizes and at the end the 'true' tells us that the image will be cropped to these sizes. And that's it.

No access to wp-admin folder Error 310 (net::ERR_TOO_MANY_REDIRECTS):

I'm using simple-301-redirects and got this message The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. Error 310 (net::ERR_TOO_MANY_REDIRECTS): Take a look at this post Error 310 Error Which indicates it's probably a permissions problem . However in my case when going to check my Permissions i noticed the wp-admin folder had disappeared re-uploading my last copy fixed the issue.

PHP function to take a copy of your Database

On occasion you may only have FTP access to your website and need to take a snapshot of the database.  Here's a quick hack

Friday, 26 April 2013

joomla 1.5 administrator started displaying recaptcha message

This has started in the last week on my Joomla installations. 

I get the messagein Joomla Administrator

Are you human?

We have detected an increased number of attempts to access this login page. To help us keep this website secure, please let us know that you’re not a robot by entering the text from the captcha below.

After doing a search for:

joomla 1.5 administrator folder recaptcha

joomla 1.5 administrator started displaying recaptcha message

 I found this post Joomla admin folder showing reCaptcha  - and it seems its something being added by shared host providers.

In my case Heart Internet.

Thursday, 4 April 2013

Joomla Virtuemart Store - Google PageSpeed Insights telling me GZIP not working.

After running a page speed test on Google PageSpeed test it was coming up that many pages weren't being Gzipped.  Even though this GZIP test http://www.whatsmyip.org/http-compression-test/ was telling me GZIP was activated. 

I checked that the feature was active in Joomla .  This is in

> admin
> click on 'site'
> drop down to 'global configuration'
> click on 'server' tab
> and make sure the 'GZIP Page Compression' radio button is ticked.

What I did to solve the issue was to untick this feature and do the gzip by .htaccess instead.  

Here's a guide on to do this 'use gzip in .htaccess'

in short you need to use this code in .htaccess

SetOutputFilter DEFLATE

Wednesday, 3 April 2013

Wordpress 'Fast Secure Contact Form' - setup for radio and Multiple Selections

I was getting this message after attempting to set up some different types of form inputs on www.mitweb.co.uk 

Error: A radio field is not configured properly in settings.

Error: A select-multiple field is not configured properly in settings.

To fix this .

>  go to your admin area

> on the left go to 'Plugins' and then 'FS Contact Form Options'

> Scroll down to 'Extra fields' and in the 'Label field' it needs to be formatted like


so my radio box was ->  Message Type:,Quote;Order