Archive for the ‘WordPress’ Category

Blocking WordPress Blog Spam with .htaccess

Post under Apache, WordPress | By LGR | On November 5th, 2011

While I am a fan of Monty Python’s Spam skit, I am not a fan of automated WordPress spam, and it seems to be getting worse every day. Of course the large majority of WordPress comment spam is just automated comments posting directly to the WordPress wp-comments-post.php file. I have used different methods in the past but recently came across a way to help keep the spammers away.

While there are many very good plugins available for WordPress to help keep spam down, sometimes the best method is to use your we server to block it in the first place. Thanks to a very helpful post on the V7N forum here is a way that you can block a large portion of automated comment spam using your .htaccess file.

Before you add these six lines of code to your .htaccess file on the root of your WordPress installation be sure to make a copy, just in case something goes wrong. The wp-comments-post.php file is located in the root of your WordPress install so you need to add this code to the main .htaccess file. If you have pretty permalinks turned on you probably will not need the “RewriteEngine On” line, since pretty permalinks already turns that on.

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]

Anyways the code basically does this. It checks for someone posting directly to the wp-comments-post.php file, which automated spam bots do, and if the referrer is not your domain it redirects that request back to the IP address of of where the request came from.

I have been testing this out for a few days now and I am pleased to say that the amount of spam that has made it through is significantly down. It is not all gone, and there is still some making it through, but the percentage has decreased significantly. You will still need to run Akismet to catch the spam that is done by real people but this can help lower the load on your WordPress site from the automated spam bots.

If spam has your WordPress website swamped give this a try and see if it helps to turn the tide in your favour a little bit.

After you have done that take a break and enjoy the Monty Python Spam skit.

WordPress Backup

Post under WordPress | By LGR | On October 1st, 2011

If you run a WordPress powered website you probably know how important it is to backup your website database and files. If you don’t know that you need to be doing that please start!

There are lots of different methods to backup your WordPress database and files and I perform regular backups of my site and clients websites. Did you know that it us actually possible to backup your WordPress website straight to your Dropbox account?

Dropbox is a great tool that syncs files between computers. I still use it regularly to make sure I have the latest files on my laptop from my desktop. They offer 2gb of space for free, more than enough for storing the majority of WordPress users backups.

OnlineBackupDeals.com (note: I help them run their website) has this great post on how you can use a plugin or two and have your WordPress backup sent straight to your Dropbox account. While this method of backing up your WordPress website might not be for everyone it could be handy to occasionally have a copy of your website backup in your Dropbox account.

I tested a few of the plugins out that are mentioned and my favourite was BackWPup. It seemed to offer the most options as far as scheduling and what to backup. Not to mention it offered more choices of backup destinations that just Dropbox. So if you have an Amazon S3 account you could backup to there instead.

I did not spend a great deal of time testing the plugin for how many resources it used. If you have a large blog it could eat up a considerable number of resources. Just a word of caution if you are on shared hosting. If you use the BackWPup plugin what has been your experience regarding server resources? Have you had any problems?

You can never have enough backups so it might be worth trying out BackWPup. If you send your backup to your Dropbox account you would easily have access to it whereever you need it.

How to Build a Website in Under 60 Minutes

Post under Blogging, Web Design, WordPress | By LGR | On August 29th, 2011

Building a website used to be extremely difficult. You had to know HTML, cascading style sheets, possibly javascript and graphic design. Things have changed, now it is possible to build a website in under 60 minutes. Don’t believe me? Here are the steps you need to create your own website in 60 minutes.

Step 1: Register a domain. Using GoDaddy or your other favourite domain registrar get your own domain name registered. Time required 5 minutes.

Step 2: Get hosting. You can spend hours and days researching web hosts. To do this as fast as possible look at a decent WordPress host. I recomend Hostgator, but there are several good WordPress hosts. If you already have a hosting account somewhere you can probably skip this step and simply use an addon domain on your current hosting account. Time required 25 minutes.

Step 3: Change nameservers. This step only takes a few minutes. You need to login to your registrar and set your new domain name nameservers to point to your web hosting account. Time required 5 minutes.

Step 4: Login to your web hosting control panel and use their script installer to install WordPress. Most cPanel hosts have Fantastico to quickly install WordPress. Time required 10 minutes.

Step 5: Login to your new WordPress install and start writing! You have 15 mins left to spare to write your first post.

Now of course this only gets you the bare bones of a website. There is still a great deal more work to do like finding a new theme for your website and customizing it. Adding some plugins to help with different website tasks. Creating a Twitter account to help promote your new website. Creating a Facebook page. Taking the time to update your website regularly with new content. Well, you get the idea, but setting up the core of a website can be done in less than an hour.

WordPress CSVPig Plugin

Post under Tools, WordPress | By LGR | On June 10th, 2011

One of the tasks I have been doing regularly lately is converting older static HTML websites into WordPress websites. For smaller websites it is not difficult to copy and paste the data into the new WordPress site. The problem is, what do you do with a larger website of a few hundred to a few thousand pages? The very thought of copying and pasting that many pages from plain HTML into WordPress does not thrill me to say the least. Thankfully I have come across the BlogPig CSVPig Import plugin.

BlogPig makes several WordPress automation plugins, some of which could be seen as more on the darker side of blogging, but CSVPig is a tool that is badly needed to help import data into WordPress. It does pretty much exactly what you would expect it to do, it imports a CSV file into WordPress.

You can choose to create post or pages, create different templates depending on what you are importing and even schedule the posts to be published at some future date.

Now, you might be wondering how I use BlogPig CSVPig to import static HTML files, well it is pretty easy actually. I wrote a PHP script that takes a list of URL’s processes the page and saves the content into a CSV file. It helps that I created many of the sites that I am converting so I can make sure the HTML structure is consistent. I won’t post my script because there is a potential to use it to scrape a site.

You can also use BlogPig CSVPig for creating many other sites. I have seen it used to create affiliate based sites using merchants datafeeds. You could use it to create your own store or even to manage your own website using a spreadsheet if you are more comfortable using spreadsheet software.

For now I have found BlogPig CSVPig very useful to help clients transition from basic HTML based websites to a WordPress powered site where they have more control over their website and information.

WPtouch Pro – Easily Build Your Mobile Website

Post under WordPress | By LGR | On October 13th, 2010

One of the reasons I love to work with WordPress is because it is so easy to extend it using plugins and themes. With mobile usage on the rise it is becoming more important to have not just a website but also a mobile version of your website so people visiting on smartphones like the iPhone, Android based phones, Blackberry and the new Windows 7 based smartphones have a customized experience. That is one of the reasons why I setup a mobile version of the LGR Internet Solutions website but there are easier ways to get a mobile website up and running on WordPress. If you are looking for an easy way to start offering a mobile version of your website take a look at the WPtouch Pro plugin by BraveNewCode.

WPtouch Pro is how many high end websites create their own mobile version, including TechCrunch, although I believe they have modified it for their own needs. WPtouch Pro is the latest version of WPtouch and is only available for purchase. You can still get the original 1.9 in the WordPress plugin directory, but the cost to purchase version 2 for one website is only $29.00! I know some people that spend that on coffee in a week, so the cost is really not that much.

The ease of offering your readers a customized mobile version of your website using WPtouch Pro is fantastic and is another great reason why you should use WordPress for creating your website. You can spend hours upon hours creating your own mobile website version, or just build with WordPress and use a plugin like WPtouch Pro to give your clients and customers access to the information they want easily.

WordPress Headway Theme

Post under WordPress | By LGR | On July 7th, 2010

I have written about some of the premium themes that are available for WordPress before but I wanted to tell you about a fairly new premium theme that is available for WordPress that I am quite impressed with. It is called Headway and it is different than many of the other premium themes that are available.

Headway is not just a premium theme, it is more a framework to build off of. There are a number of very good frameworks to start to build WordPress themes with but Headway has a unique visual editor that makes it easy to drag and drop different components into your theme. You can easily remove a sidebar on pages where you do not feel I is needed or add a sidebar to sections where you want it. Changing colours and font styles is as easy as a few clicks and changing the layout of a header is a breeze.

There is also the ability to use easy hooks to place content where you want it in the theme. Want to add some extra text to the footer, use an easy hook. Want to add an ad before or after a post, use an easy hook.

Many of the websites I have been working on lately are conversions from static HTML sites where clients are happy with the look and feel of their current website, but want the ability to edit the site themself and perhaps add a blog. Headway has become invaluable in recreating the clients website into WordPress.

Headway has also made the need to add the All in One SEO plugin no longer needed. Headway has taken many of the options of All in One SEO pack and intergrated them into the theme. You can control all the aspects of SEO including setting a custom title, meta description and keywords.

If you are looking for a fantastic theme framework to build your WordPress website with, or are a developer wanting an easy to use framework for your clients websites take a serious look at Headway. I have already created two WordPress based websites with it for clients and it has already paid for the developer license in the time I saved getting the clients sites done and out the door. Best of all my clients are happy because they can use WordPress to manage their websites and add new content.

WordPress 3.0 Released

Post under WordPress | By LGR | On June 17th, 2010

If you use WordPress for your website or blog you might have noticed that WordPress 3.0 is now available. This is a major upgrade so I highly recommend you backup your database, and it would not hurt to make a complete backup of your current installation just in case something does not go as expected.

There are some great new features in WordPress 3.0 and it is a step forward from 2.9. The ability to host multiple websites with one WordPress installation will be excellent if your web host supports it. The addition of different types of pages will also allow people to extend WordPress into much more than just a blog.

If you want a great overview of the new WordPress take a look at the video below and don’t forget to visit the official WordPress blog about the release.

Mobile Version Available

Post under WordPress | By LGR | On March 26th, 2010

I recently bought a Motorola Milestone smartphone and I have been paying closer attention to mobile websites. I have talked about making a mobile version of your website available in the past but it has become increasingly more noticeable to me how important the mobile space is becoming.

Making applications seems to be all the rage but I am not sure who would use an app for an average website or blog. Sure sites like TechCrunch and CNET can probably create an app for the iPhone and Android phones and get a number of downloads but is it worth it for the rest of us? Probably not. Then there is the option to offer a customized mobile web version which is possible for the majority of websites.

I recently installed the WordPress Mobile Edition plugin to offer people using mobile browsers a more friendly experience. It certainly does offer a nicer version, and makes it easier for mobile web users to read the site.

The plugin uses the Carrington mobile theme. It is nicely designed and makes it easier for a mobile user to browse a website on their mobile device. I have not done any customization to the theme yet, but I plan on adjusting the colours and making the mobile version of the LGR Internet Solutions website match the full version a little more.

Making your current website more accessible to mobile users is something to consider for your website instead of making a stand alone application. It will allow you to provide a customized mobile experience for your mobile visitors while still providing your regular visitors your full website experience. It will also make it easier and cheaper to maintain since you will still only need to update only one website.

Here are a couple of screenshots of the LGR Internet Solutions website on the Android emulator.

WordPress 2.8.5 Released

Post under WordPress | By LGR | On October 21st, 2009

WordPress has released 2.8.5. It is a hardening release, taking some of the latest enhancments from the upcoming 2.9 release. Highlights of the 2.8.5 release according to the WordPress blog are:

The headline changes in this release are:

  • A fix for the Trackback Denial-of-Service attack that is currently being seen.
  • Removal of areas within the code where php code in variables was evaluated.
  • Switched the file upload functionality to be whitelisted for all users including Admins.
  • Retiring of the two importers of Tag data from old plugins.

More details are available on the WordPress blog. Do not forget to backup your WordPress database and files before upgrading, just in case something goes wrong with the upgrade. The easiest way to upgrade is to use the built in upgrade feature inside WordPress. If you cannot use that feature or just prefer to use FTP to upload the new files you can download the new WordPress release to upload.

WordPress or Joomla?

Post under Joomla, WordPress | By LGR | On July 30th, 2009

Last week I open up the doors to questions and got some great ones. I thought I would start with one of the questions from Angie.

WordPress or Joomla? Which is better and why?

I have actually posted about WordPress and Joomla in the past and at the time when I wrote that post I leaned towards using WordPress for blogs and Joomla for websites. The main reason was because of an issue I ran into creating a website with WordPress and how it handled pages. That problem seems to have been fixed and I have since created WordPress powered websites with large numbers of pages and not suffered any kinds of problems. Since I wrote that initial post on WordPress or Joomla, I have to admit I have been converted to using WordPress for more than just a blog and more as a complete content management system. Some might say this is like comparing apples to oranges, that they were created for different reasons. That might be true, but to webmasters and bloggers the reasons why something was created is not necessarily the most important thing. The most important thing is that it works.

  • Administration

    In my experience WordPress offers webmasters and bloggers a better administration section to use and maintain their websites. The administration pages are easier to learn, and faster to respond. The Joomla administration has a steeper learning curve and is not as easy for people to learn.

  • Friendly URL’s

    WordPress permalinks feature offers an easy way to set friendly URL’s for a website or blog. Joomla has a friendly URL option, but it does not compare to the WordPress ability to make friendly URL’s. You can install other extensions to improve upon Joomla’s friendly URL’s and that works as long as the extension author keeps the extension up, and that it does not break with the next upgrade. With WordPress this is built into the core. WordPress makes it much easier to make your URL’s look nice to your visitors.

  • SEO Friendly URL’s

    Having friendly URL’s is great for users, but it is also great for the search engine’s. WordPress nice permalink feature puts it ahead of the Joomla for SEO.

  • Duplicate Content Issues

    Both WordPress and Joomla suffer from a problem involving duplicate content. With WordPress it happens because of archives, categories, and tag pages all having duplicate content as the posts and pages. With Joomla it occurs because of menu pages. The problems exists for both, the difference is it easier to fix using WordPress. Even with out the use of plugins in WordPress it is possible to create a robots.txt file to prevent indexing of the categories, tag and archive pages leading the search engines to the one copy of your original content. With Joomla it is not as easy. Partly because of the problem with friendly URL’s.

  • Extendibility

    Both WordPress and Joomla have a plugin or extension system that allows you to add in other features that are not native to the software. This is mostly a personal preference, but I find the WordPress plugin system much easier to work with and more reliable. I seem to be regularly fixing problems and errors with Joomla extensions.

  • Really Simple Synication (RSS)

    WordPress offers a much better RSS system than Joomla that makes more content available to readers.

  • Speed

    I have not sat down and timed how long it takes to add new pages or posts into WordPress or Joomla, but I know that it certainly feels much faster to publish new content on WordPress. There is a post Playing with Wire that looks more at usability between WordPress and Joomla.

While there are reasons to choose Joomla over WordPress they are quickly becoming less. In the end it comes down to what you want to do with your website and what is the easiest, most user friendly system to do it with. More and more WordPress is the easiest, user friendly system to accomplish that task. WordPress is easier to use, faster to train non-geeks, and overall allows individuals and businesses of all sizes to create interesting websites that keep people coming back too. For the majority of people WordPress will easily meet their website and blog needs.

If you are looking for a way to demo both WordPress and Joomla without installing them. Take a look at OpenSourceCMS. There you can try both systems out. The here is the Joomla demo, and here is the WordPress demo.

What do you prefer WordPress or Joomla? What made you decide one over the other?