I’ve changed the permissions for WP Statistics access and now I’ve lost access to it myself, how to I fix it?

If you have access to phpMyAdmin (or similar tool) you can query the wp_options table:

SELECT * FROM wp_options WHERE option_name = 'wp_statistics';

Then edit the value, inside the string will be something like (note: “edit_plugins” will be whatever permission you selected):

s:15:"read_capability";s:12:"edit_plugins";s:17:"manage_capability";s:12:"edit_plugins";

Replace it with:

s:15:"read_capability";s:14:"manage_options";s:17:"manage_capability";s:14:"manage_options";