How To: Fix Nick Berlette’s excellent Redirect Plugin for WordPress 2.6 and higher

The static pages (like Store) are working again.  I’ve had to fix the redirect plugin by Nick Berlette.  If you want it to work with your modern WordPress blog (2.6 or higher) you just need to change a tiny bit.
Remove this:

require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-config.php');

Replace with:

$root = dirname(dirname(dirname(dirname(__FILE__))));

if (file_exists($root.'/wp-load.php')) {
    require_once($root.'/wp-load.php');
} else {
    require_once($root.'/wp-config.php');
}

It should work fine now 🙂

Share Button

In WordPress 2.5.1 – finding the missing comments in the admin -> show all comments

If you have comments in your WordPress 2.5.1 blog but the admin page says you don’t:

Then you probably have a missing index on the table wp_comments.  You just need to add an index on column comments_date_gmt:

Share Button

Why I won’t be moving to WordPress.com

I’ve been looking at switching host providers from Yahoo for some time.  I did a test migration to WordPress.com but discovered that they really don’t seem to get that many people would like to control their own blog.  For a simple blog, WordPress.com would be fine but you might as well go with Livejournal.com, Facebook or some other blogging system then.  I don’t see what value WordPress.com offers.

  • No javascript is allowed in widgets:

My code has gone from my widget

If you paste code into a widget, save and when you look again it has gone then the system has removed it.
This is done for security reasons.

Anything that has a line like this:
<script type="text/javascript">
or that uses Form or Input tags for instance is not allowed. There are other tags but the effect is the same – they disappear.

There are no exceptions to this.

  • You can’t add plugins to your wordpress blog:

Where is my plugins tab?

Unfortunately, there isn’t one to be found!

For various reasons we do not permit the uploading and use of plugins here at wordpress.com.

The hosting is simply for your blog even if you would pay $$ for email services.  Sure, they have a hack that will allow you to redirect to Google Apps but you might as go with Google’s Blogger then.  Perhaps I’m just not getting the point of WordPress.com (not to be confused with WordPress.org).  Can someone enlighten me?

Share Button

WordPress, MySQL and a bit of corruption caused the tags & categories to disappear

Sometime early this afternoon, the categories & tags of my blog disappeared. After a little bit of investigation (I was working quite heavily at the time), I discovered that the wp_term_taxonomy table in MySQL contained minor corruption. I ran repair table ‘wp_term_taxonomy’ and it was corrected.

Share Button

FW: WordPress vs. Drupal: Not that it’s about winning

Selena over at Tending the Garden, posted a very good video of why you would choose WordPress or Drupal. It seems a little slanted towards Drupal but that may just be me 😉

Share Button

SOLVED: WordPress 2.5 and the annoying captcha to read

Hi all,

I’m sure you’ve noticed by now but every so often a captcha will pop up when you’re reading my blog. This appears to be a feature of WordPress 2.5 which I haven’t been able to disable yet. If anyone knows how to disable it, please let me know as the captcha is very annoying.

I’ve asked this on the WordPress.org forums as well: WordPress 2.5 and the annoying captcha

UPDATE: Looks like the culprit was http://crazyeddie.info/dealer/dealer.js in the footer.php file of the GlossyBlue 1.4 theme

The official download site http://www.ndesign-studio.com/resources/wp-themes/glossyblue/ doesn’t have this code. I did download it last week… hmmm

Otto42 over on the WordPress.org forums identified the script as:

It’s a captcha defeating system. It’s not checking if you’re human or not, it’s sending the results back to crazyeddie.info to let the thing bypass the captcha from some other site!

I just went through all the files and verified that the only java script files that are being pulled are official ones.  Kudos to Otto42!

Share Button

Got hacked and now we upgraded WordPress

During the last couple of days this blog was hacked twice due to the old version of WordPress that Yahoo! install on hosted websites. The first hack was sending out a virus which was removed and the site was repaired. The second was graffiti and the deletion of about 30% of the WordPress install.

I followed the WordPress upgrade instructions but ran into a snag where the WordPress user in the MySQL database didn’t have the permissions to alter the tables in the database. There are two solutions to this:

  1. Replace the DB_USER and DB_PASSWORD in wp-config.php with the yroot login password. I didn’t know the yroot password.
  2. Use phpMySQLAdmin to grant alter table privileges to the DB_USER. Since I didn’t have grant permissions, I had to modify the mysql.user table directly. Thanks goes to Alan Guilan for the method 🙂

We are now fully upgraded to the current release of WordPress.

Share Button