← Back to Archives

Trouble installing WPBlacklist 2.8...

system

I had a bit of difficulty installing WPBlacklist 2.8 for a Wordpress blog... here's how I recovered.

So, the spammers have hit the p2p blog. (I can't use AuthImage because its usability stinks; I had more than one complaint of entire comments being arduously typed in and then lost when the auth code was mistyped).

So, I decided to use the Wordpress port of Jay Allen's MT-Blacklist, called WPBlacklist. Unfortunately, I had some significant problems with the install.

When, as the instructions indicated, I ran blacklist-install.php this action would only barf a bunch of php onto the screen starting with:

query($sql); // update table structure for WPBlacklist 2.1 [...]

Why was this happening? After looking at the php code, I had a feeling it was not able to create the blacklist table in the blog's database. So, this means I had to create it by hand using mysql from the command-line.

Here's what I did.

  1. Enter mysql from the command-line and type use db (where db is the name of the database for your blog or for you depending on if you have a separate database for the blog and other activities).

  2. Create the blacklist table using the following mysql script:

    CREATE TABLE IF NOT EXISTS blacklist (id int(11) NOT NULL auto_increment, regex varchar(200) NOT NULL default '', regex_type enum('ip','url','rbl','option') NOT NULL default 'url', KEY id (id), FULLTEXT KEY regex (regex)) TYPE=MyISAM AUTO_INCREMENT=1046;

  3. Prepare the table for the WPBlacklist format suitable for WPBlacklist after version 2.1:

    ALTER TABLE blacklist CHANGE COLUMN regex_type regex_type enum('ip','url','rbl','option') NOT NULL DEFAULT 'url';

  4. In your Wordpress backend, got to "Plugins" and "Activate" the WPBlacklist plugin.

  5. Click the "Blacklist Configuration" link in the description of the WPBlacklist plugin on the "Plugins" page. Import Jay Allen's blacklist and change the settings as you like.