You want to activate 2FA, uncheck the Disable XML-RPC authentication or change something else in Login Security Options, but Wordfence doesn’t save your changes. After the page reloads, nothing is changed (is the video below familiar to you?).

Many reasons can cause this issue. Corrupted database tables (you can try to optimize them). Wrong permissions of your .htaccess file (double-check you have set them to 644). Some server-side or alternative upstream caching services (try to disable them temporarily and clear the browser cache). Or you are just using deprecated SQL storage engine MyISAM, and you need to migrate to InnoDB.

TL;DR – Change your SQL database storage engine from MyISAM to InnoDB:

  1. Using phpMyAdmin administration (or some other that your provider uses)…
  2. export your existing database;
  3. create a new database with InnoDB storage engine;
  4. import your database exported in step 2;
  5. edit wp-config.php and fill in the proper records for the new database (DB_NAME, DB_HOST, maybe also DB_USER, DB_PASSWORD);
  6. deactivate Wordfence and delete tables for Wordfence manually (or by deactivating the plugin);
    • you can do it before step 1 too;
    • you can try to export the Wordfence settings firstly in “Wordfence -> Tools -> Import/Export Options”) if you wish;
  7. activate the Wordfence plugin and new InnoDB will be created;
    • you can try to import Wordfence settings  exported in the previous step (I didn’t try that, but it should work);
  8. voila, everything works now.

1. Log in to phpMyAdmin administration (or some other that your provider uses). As you can see on the bottom bar, this “wptest” SQL database is using the MyISAM storage engine.

2. Export your existing database – so you don’t need to copy&paste all your content after you migrate to the new InnoDB storage engine. It’s effortless – in phpMyAdmin, select “Export” and then click on “Go”.

3. If you haven’t already created one, now this is the time to create an InnoDB SQL database. You can do this somewhere in the administration of your web hosting (or contact your provider). In this case, I created a “wptestinnodb” database.

Then, import your SQL database using the phpMyAdmin tools (Import -> Select file -> Go).

4. Now, all your content (pages, posts, etc.) is also in the new database. The database itself is using the InnoDB storage engine (as you can see on the bottom bar). But the tables are MyISAM type - it doesn't matter now, we will solve it later.

5. We have a new database, but our WordPress installation is still using the old one. Let's change that. Edit the "wp-config.php" file (on your server) and fill in the proper records for the new database.

  • DB_NAME - the name for the new database - in this scenario "wptestinnodb"
  • DB_HOST - in this case ""
    • MyISAM uses "localhost" as host, InnoDB doesn't - you will find the proper information in you web hosting administration
  • DB_USER and DB_PASSWORD - it depends if you are using the same user to access the InnoDB database as for the MyISAM; if not, fill in the new login information
Old MyISAM databaseNew InnoDB database

6. We have a new database, but the tables are still MyISAM types. We need to change the tables of Wordfence plugin mainly (prefix "wp_wf..."). We can do it manually by changing every Wordfence table in the database (in phpMyAdmin administration), or we can force the Wordfence to create new InnoDB tables.

  • If you have already set the plugin up, maybe you will want to export the settings ("Wordfence -> Tools -> Import/Export Options") to be able to import them afterward (I didn't try that, but it should work);
  • disable the Wordfence plugin and delete all the "wp_wf..." tables in your database manually in phpMyAdmin;
    • or check the "Delete Wordfence tables and data on deactivation" option in "Wordfence -> Dashboard -> General Wordfence" Options and then deactivate the plugin (the tables will be erased - if not all of them, wipe the rest of them manually in phpMyAdmin);
  • in phpMyAdmin check, if the Wordfence tables are erased;
  • activate the Wordfence plugin.

7. At this time, when we are using the SQL database with the InnoDB storage engine, Wordfence will create InnoDB tables automatically. If you have exported Wordfence settings, now it is time to import them back.

8. Finally, everything works well now.

PS: If you don't want to delete the Wordfence tables in the imported database, but rather change them manually:

  • log in to phpMyAdmin;
  • now, one-by-one, change the "Storage Engine" from MyISAM to InnoDB for every "wp_wf..." table in your database.

One-by-one... (19 tables in total - starting with "wp_wfblockediplog" to "wp_wftrafficrates"). This is just an example of changed "wp_wfconfig" table.