Reducing WordPress Comment Spam

Self-hosted WordPress sites often attract a lot of comment spam which requires your valuable time or resources to reduce to more manageable levels.

  • We recommend automatically turning off commenting on older posts, because these are the posts that often rank very well in Google which attracts the spammers in the first place. Most blogs choose to turn commenting off on posts that are three months old or older. (We usually do six months.)By turning off commenting on older posts, our spam dropped approximately 25% and it didn’t cause our WordPress site to load any slower.
  • Akismetis possibly the most effective method of reducing spam through a WordPress Plugin. Akismet works by connecting to a hosted web service to determine if comments or pingbacks are spam or legitimate.By using Akismet, we reduced the amount of comment spam by nearly 100%, but Akismet unfortunately isn’t free any more for business users.
  • Disqus is an amazing WordPress Plugin that is used for commenting. Disqus uses a hosted web service to moderate comments and automatically connects to an extensive blacklist and whitelist to reduce the amount of spam comments automatically.
  • Bad Behavior is one other WordPress plugin we use to reduce spam by not allowing the spammers to access our site in the first place. Bad Behavior works by analyzing the way the browser/program/user is using the blog and blocking them, and of course Bad Behavior also has an extensive database of common spammer Ip addresses that it also uses to block.

What is your preferred method for reducing comment spam? We believe that there’s no one technique that will completely eliminate spam, but these techniques together will help you better use your resources.

Akismet (Anti-Spam)

Akismet has worked extremely well for me over the last two years, it’s only inaccurately identified two comments as spam out of almost 20,000 comments. Akismet is pretty much the only plugin used on every WordPress blog, and works for almost everyone although it is no longer free for business use.

There’s been reports over the last year or so of comments missing for some people, but I haven’t ever experienced this or heard from anyone I know of comments disappearing.

Although, extremely good Akismet won’t always solve all spam problems especially on sites with a lot of traffic. I usually recommend using a capatcha with Akismet.

What do you recommend or use?

Zen Coding

When I first heard of Zen Coding on Sitepoint, I figured it was some other gimmick that might save me about 0.01% of my time each year after I spend five or six hours learning the syntax.

Zen Coding works by expanding some abbreviations into properly closed html. The syntax is very simple, and can be easily explained in just a few examples. The syntax is basically CSS selectors which most web designers / web developers should already know.

Overall, I found installing and using Zen Coding to be very worthwhile. I just made sure to change the shortcut key in Notepad++ because Ctrl + E wasn’t doing it for me. :)

Ports exist for a lot of different editors, and IDEs, so check it out. What other productivity tools do you use?

Why I Recommend PayPal

I spend a significant amount of my timing deal with ecommerce and different shopping systems. One of my all time favourite solutions is using PayPal and Magento together because they have been designed from the ground up to interact well together.

International Acceptance
PayPal is accepted in many countries and is capable of doing automatic currency conversion.

Integration
PayPal is very easily integrated in all open source shopping carts, and is often freely available requiring very little work for developers.

No Monthly Fees
Many of the other merchant systems require monthly payments even when your business is closed. PayPal charges a per transaction fee which all of the merchants also charge! If you’re accepting debit the transaction fee could be fairly expensive, but usually it is much cheaper for credit card transactions.

Lots of Payment Options
PayPal does e-checks, American Express, Visa, MasterCard, and Discover. PayPal is expected to release applications for smartphones, and the iPad very soon which will allow you to use your device as a wireless terminal.

Secure
You won’t need to spend time worrying about PCI compliance, because the credit card transaction is actually stored and processed on PayPal’s end. Money is usually transferred immediately for credit card transactions.

There are some other shopping solutions available, but don’t expect them to work as well or be as affordable PayPal.

Hope this helps!

WAMP Server Not Accessible on Port 80

WAMP Server generally runs fine without any problems, although sometimes we have to make some configuration changes because of other software monitoring ports. Skype, for example, is commonly using port 80 to communicate and stopping apache from responding.

If you’re using WAMP and apache at the same time, you need to left click the WAMP Manager icon in the system tray and go to apache -> httpd.conf and look for a line that says: Listen 80 to instead use a different port like: Listen 8080.

Hope this helps!

WAMP Server On Windows 7 64bit

Getting WAMP to run properly on Windows 7 isn’t very difficult as long as the permissions are properly set. Also, keep in mind that you may need to modify your windows firewall settings, and bit defender if you have it running.

WAMP needs full administrator privileges which as you may be aware needs to be set in UAC. The easiest way to change this is to go into the C:wamp folder and right click wampmanager.exe and go to Properties and then Compatibility.

Check the “Run as Administrator” checkbox and then press Apply and Okay. You may unfortunately have to confirm each time your machine starts that it should have these privileges.

Magento CheckOut Page Blank

I had a very strange issue with a client’s installation of magento a few nights ago. The checkout page was completely blank and the apache error logs were completely empty.

I tried all the usual fixes of looking at file permissions, updating the magento installation, checking for new modules, etc but none of these solutions solved the problem. Eventually, someone on the forums suggested to me that maybe I should see if Compilation was turned on. I completely forgot that I had turned on System Compilation to increase the performance of the site.

After, i went into ystem → Tools → Compilation and disabled it, the checkout page started working again and customers could continue to order.

PEAR Mail – Checking If Mail Sent

PEAR Mail & mail_mime is absolutely fantastic for sending multi-part mime emails and requires absolutely no effort. Probably, the best part of PEAR Mail & mail_mime is not having to deal with mime boundaries.

I often see incorrect code for handling whether the message successfully sent or not. To check if the message is sent we should do something like the following.

$isSent = $mail->send(...);
if (PEAR::isError($isSent)) {
// error handling goes here
} else {
// successfully sent code goes here.
}

If we simply use the following code, we’ll always have a true condition because $isSent won’t be set to null.

$isSent = $mail->send(...);
if ($isSent) {
// successfully sent code goes here.
//Unfortunately this will always be called
} else {
//code here will never actually be executed.
}

Hope this helps!

Installing PEAR on BlueHost

PEAR as I’m sure you’re aware stands for “PHP Extension and Application Repository” and is one of the leading frameworks for reusable components.

Installing BlueHost can be easily be accomplished using the Fantastico located inside your Cpanel access. The configuration of PEAR can be quite a challenge though!

The PEAR installation as I’m sure you’ve seen already is extremely simple. Configuration will require modifying your php.ini file. If you don’t have a php.ini file in /public_html you will need to follow the following steps.

  1. Log into Cpanel. Click PHP Config
  2. Click Install PHP.INI Master File

Now that you have a php.ini file that we can modify you will need to find the line include_path. In my php.ini file it is line 503. Change the include_path to the following making not that you will need to replace the # number with your potential number, and {{YOURBLUEHOSTUSERNAME}} should be your bluehost username without the domain name.

If you don’t know these details you can find them under the main page of Cpanel under Stats, Home Directory.


include_path = ".:/usr/lib64/php:/usr/lib/php:/home#/{{YOURBLUEHOSTUSERNAME}}/php"

Some of the core PEAR packages aren’t always installed. For example, I’ve had to go back into the PEAR Config form and search for Mail and install it.

Hope this helps!

Add A Facebook Like Button

A while ago, Facebook created the Facebook Like Button that works by using an iframe of FBML. The Like button allows you to easily get some free social media coverage with consumers.

Many websites and blogs are making use of the Facebook Like button and any other ways possible of sharing on social media networks because the cost is so minimal and publicity is so important to any business.

Adding the button is extremely simple, although it does require some editing of .phtml files, an ftp client, or experience with VI or EMACS if you have SSH access.

Step 1: Open up app/design/frontend/default/{{YOURTHEMENAMEHERE}}/template/catalog/product/view.phtml

Step 2: Search for the following code.

getReviewsSummaryHtml($_product, false, true)?>
getChildHtml('alert_urls') ?>

Step 3: Paste this code between the two lines of above code.

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo $_product->getProductUrl(); ?>&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>

Step 4: Open up your website and view a product. If you can’t see the Facebook Like button you may need to clear the Magento Cache.

Hope this helps and good luck with your business!

Slider by webdesign