admin管理员组

文章数量:1134076

RESOLVED --

Current task is to install, enable and configure CiviCRM on a wordpress site.

I enabled CiviCRM for the first time on this installation, and as it was the first time, I followed a link to read some documentation, but when I used the back button saw this error, and have been unable to recover since.

Sorry, you are not allowed to access this page.

I have watched videos, read articles and as advised, have tried:

  • ensuring my use is the Administrator
  • recreating the .htaccess file
  • disabling the civicrm plugin (I only see this error when trying to activate civicrm)
  • disabling theme
  • reviewing logs (no sign in error log, 403 in access log, but without clues as to why)

Using the plugins page, I de-activate (the never activated) CiviCRM plugin, and then delete it from the installation. Even so I see remnants of its existence in the wp_options tables, in 6 records.

$ mysql -u db_user -p db_name \
    -e "SELECT option_id, option_name FROM wp_options WHERE option_value LIKE '%civicrm%';"

Enter password: 
+-----------+--------------------------------+
| option_id | option_name                    |
+-----------+--------------------------------+
|       100 | wp_user_roles                  |
|       172 | recently_activated             |
|       312 | wpvivid_last_msg               |
|       314 | wpvivid_backup_list            |
|      1205 | fs_accounts                    |
|      2712 | _site_transient_update_plugins |
+-----------+--------------------------------+

My question is, how can I fully purge the word press database of all signs of the deleted plugin?

UPDATE:

Thank you Jacob Peattie.

I ran: wp role reset administrator, then used unzip and the activate link to reinstall CiviCRM, from scratch, but still encountered the error: Sorry, you are not allowed to access this page. I think I want to explore the database further to see how it is that user privileges are managed in wordpress, see if I can find some way of manually resetting what the plugin failed to do.

Might also file a bug against the plugin about its failure to cleanly deactivate/delete when the time comes. Does delete do anything other than remove the plugin code? Is deactivate fully responsible for cleaning up the database configuration?

Nothing evident from reading the two files/paths named WordPress.

Nothing evident from: mysql . . . -e "SELECT * FROM wp_usermeta;" | grep -i civicrm

But I found this, after using the deactivate / delete links at /wp-admin/plugins.php:

$ mysql -u . . . -e "SHOW TABLES;" | grep -i civicrm
Enter password: 
civicrm_install_temp_table_test
civicrm_utf8mb4_test

Attempts to DROP (these two) TABLESs using the cli resulted in: DROP command denied to user, but I was able to DROP them from phpMyAdmin from the control panel. Testing again; and SUCCESS!!!

I now am able to use the activate link to get to: /wp-admin/admin.php?page=civicrm-install.

本文标签: