Archive for April, 2013

18 April, 2013 — Snippets, WordPress

Add Custom Image Sizes to WordPress Uploader

A few days ago I needed to add a custom image size to the WordPress uploader and I wasn’t sure how I would go about doing this. Then I found a new hook that was added in WordPress 3.3…

It means more image size options for your websites, with all the magical ease of WordPress’ image management and cropping – upload once and job done!

All the following code goes into your themes functions.php file.

Show me the code!

Firstly we need to add your custom image sizes so WordPress knows about it.

add_image_size('featured', 670, 280, true);

Find out more about add_image_size here.

Once you have this added we can now add a bit more code that will actually add the size to the drop down menu. You can do this by using the image_size_names_choose filter like so:

function my_image_sizes($sizes){
$addsizes = array(
"featured" => __("Featured")
$newsizes = array_merge($sizes, $addsizes);
return $newsizes;
add_filter('image_size_names_choose', 'my_image_sizes');

Note the first part of the array is the name you gave in the first function and the second part is what the end-user will see in the drop down menu.

Once you have all this code added save and upload your functions.php file and your good to go! If you have any problems comment below and I will help you out as best I can.


Happy Birthday!
16 April, 2013 — WordPress

WordPress Approaches 10 Year Anniversary!

As many of you may well know WordPress is approaching it’s 10 year anniversary since the initial release way back on 27th May 2003.

WordPress was founded by Matt Mullenweg and Mike Little who took a fork of b2/cafelog to form the basis of the WordPress we know of and love today. As of December 2011, WordPress version 3.0 had been downloaded over 65 million times!

The latest release version 3.5 has to date been downloaded a total of 16.8 million times…

WordPress has an ever growing community of developers who contribute there time and skills to help make WordPress what it is today. With the help of people like you the community currently have 1,742 themes and 24,455 plugins in the repository and that number just keeps growing!

With WordPress 3.6 slated for release in the coming weeks, I can only see that WordPress is only going to get better and better.

Easy Apache Error
15 April, 2013 — Hosting

!! Failed to install CPAN Perl module(s) Crypt::PasswdMD5 !! – Easy Apache

cPanel 11.36 is shipped with perl 5.14.3. that might make some problems for your cpan. Some of you might face an error while trying to run easyapache which says:

!! Failed to install CPAN Perl module(s) Crypt::PasswdMD5 !!

Well to fix this issue just run following command to install Crypt::PasswdMD5

# /usr/local/cpanel/bin/cpanm -n Digest::SHA1 Crypt::PasswdMD5

Once you have run the above code in SSH try Easy Apache again.

That didn’t work…

If the above code didn’t work run the following in SSH

# cpan
# install Digest::SHA1 Crypt::PasswdMD5
# exit

After running this try Easy Apache in WHM again and eveything should be working just fine!

14 April, 2013 — WordPress

Security Alert for WordPress Users! (Updated)


Recently there has been a security alert about a surge in attacks on WordPress sites. A network of botnets are using a brute force attacks to try to break into your site by repeatedly attempting to log in to your admin area with computer-generated credentials.

A company believes that about 90,000 IP addresses are currently involved. CloudFlare, thinks the hackers control about 100,000 bots. As for the scope of the attack, Prince says that CloudFlare saw attacks on virtually every WordPress site on its network.

It is recommended that you change your password to a secure password if you have not done already. A secure password mixes things up by using letters, numbers, upper and lower case letters, and special characters such as &#)@!, etc. It is also recommend to NOT have a username of “admin”

I also recommend that you install a plugin such as Limit Login Attempts that will limit the number of login attempts for an IP. Over the past 3 days this plugin’s download count has rocketed! If yo havent already go and download it now!


As pointed out by Matt Mullenweg supposedly this botnet has over 90,000 IP addresses, so an IP limiting or login throttling plugin isn’t going to be great (they could try from a different IP a second for 24 hours). So just make sure you are secure guys and make sure your username is not “admin”