Trouble installing WPBlacklist 2.8...
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.
-
Enter mysql from the command-line and type
use db(wheredbis 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). -
Create the
blacklisttable using the following mysql script:CREATE TABLE IF NOT EXISTS
blacklist(idint(11) NOT NULL auto_increment,regexvarchar(200) NOT NULL default '',regex_typeenum('ip','url','rbl','option') NOT NULL default 'url', KEYid(id), FULLTEXT KEYregex(regex)) TYPE=MyISAM AUTO_INCREMENT=1046; -
Prepare the table for the WPBlacklist format suitable for WPBlacklist after version 2.1:
ALTER TABLE
blacklistCHANGE COLUMNregex_typeregex_typeenum('ip','url','rbl','option') NOT NULL DEFAULT 'url'; -
In your Wordpress backend, got to "Plugins" and "Activate" the WPBlacklist plugin.
-
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.