I'm trying to install the CiviCRM plugin in wordpress, but never get to see the install page. When I want to go to "Install CiviCRM" button beneath the wp-admin-Dashboard it aborts with "critical error".

It is Debian 11.6 and everything from the repositories: WordPress 5.7.8, CiviCRM 5.33, MariaDB 10.5, PHP 7.4

Apache error log shows:

[Thu Mar 23 19:06:50.237128 2023] [php7:error] [pid 886] [client] PHP Fatal error:
Uncaught Error: Class 'Civi\\Setup' not found in /usr/share/wordpress/wp-content/plugins/civicrm/includes/civicrm.admin.php:138
Stack trace:
#0 /usr/share/wordpress/wp-includes/class-wp-hook.php(292): CiviCRM_For_WordPress_Admin->run_installer()
#1 /usr/share/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
#2 /usr/share/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action()
#3 /usr/share/wordpress/wp-admin/admin.php(259): do_action()
#4 /usr/share/wordpress/wp-admin/options-general.php(10): require_once('/usr/share/word...')
#5 {main}
    thrown in /usr/share/wordpress/wp-content/plugins/civicrm/includes/civicrm.admin.php on line 138, referer:

I did check that things mentioned at CiviCRM requirements page are in place.

I also tried chowning everything relevant to www-data without success.

What else could I think of?


1 Answer 1


I'm seeing the same issue. Wordpress 6.2.2 Civicrm-5.61.4

Can someone point me to where setup.php gets loaded to define this class?

Fatal error: Uncaught Error: Class "Civi\Setup" not found in XX/civic/wp-content/plugins/civicrm/includes/civicrm.admin.php:248 Stack trace: #0 XX/civic/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress_Admin->run_installer('') #1 XX/civic/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #2 XX/civic/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 XX/civic/wp-admin/admin.php(259): do_action('toplevel_page_c...') #4 {main} thrown in XX/civic/wp-content/plugins/civicrm/includes/civicrm.admin.php on line 248

  • hi - this is not an Answer - do you not have enough reputation to add as a comment?
    – petednz - fuzion
    May 29, 2023 at 20:18
  • correct! I've never used this before
    – scramble
    May 30, 2023 at 0:24
  • it seems that SE forces you to fire this as a new ticket and then reference this one - even though I can see the risk of your new ticket being marked as duplicate. I will convert this to a Comment if there are no other options
    – petednz - fuzion
    May 30, 2023 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.