can you get more random?

Fixing “Table ‘wp_my_blog_name_wfNet404s’ doesn’t exist in engine” wordfence error

April 3rd, 2018 Posted in Uncategorized

I’ve been using the excellent wordpress security plugin, WordFence for a long time and have been generally very happy with it. The only issue I have had is the above error, which has occurred following a disk filling up and the database crashing.

I’m documenting this here as it’s not the first time I’ve had to fix this problem and a web search for a solution gives suggestions to uninstall and reinstall wordfence, after selecting “delete all wordfence tables”. If you don’t want to delete all your wordfence data, and start with a clean install, the following solution may work for you.

Rather than getting wordfence to recreate the database tables, you can do it yourself, manually, as follows:

first check if the table exists and is accessible :

[MariaDB] desc wp_my_blog_name_wfNet404s;

If you get the following error message :

ERROR 1932 (42S02): Table 'resto.wp_sortirauresto_com_blog_wfNet404s' doesn't exist in engine

then drop the table, before recreating it :

MariaDB [resto]> drop table resto.wp_my_blog_name_wfNet404s;

To recreate the table, check the table schema in the following file : wp-content/plugins/wordfence/lib/wfSchema.php, searching for the string wfNet404s. I see the following, but it’s possible that this may change in future versions of wordfence.

  `sig` binary(16) NOT NULL,
  `ctime` int(10) unsigned NOT NULL,
  `URI` varchar(1000) NOT NULL,
  PRIMARY KEY (`sig`),
  KEY `k1` (`ctime`)
) DEFAULT CHARSET=utf8"

Use this to create the sql syntax to create the table :

create table IF NOT EXISTS wp_eat_out_net_blog_wfNet404s (
  `sig` binary(16) NOT NULL,
  `ctime` int(10) unsigned NOT NULL,
  `URI` varchar(1000) NOT NULL,
  PRIMARY KEY (`sig`),
  KEY `k1` (`ctime`)
) DEFAULT CHARSET=utf8;

You may need to do this with other tables (wfBadLeechers, …) with their own schema from the same file. Once the tables have been recreated, your next backup should take place without error.

Share

Post a Comment