1

I am trying to install CivicRM for WordPress site in Local environment https://localwp.com/. I unzip the CivicRM (5.60), I place the folder into app/public/wp-content/plugins/ folder. I see the plugin in WP admin interface. I click activate, install starts, but it fails shortly after and the whole WP site becomes unusable.

PHP: 8.0.22 MySQL: 8.0.16 WP: 6.2 webserver: nginx [![error in the wordpress backend][1]][1]

I tried to run the install a couple of times with different PHP, MySQL and webserver settings in Local, no change. [1]: https://i.sstatic.net/l92PJ.png

3
  • Welcome to SE! What is in the CiviCRM log? If you look in the database (using mysql / phpmyadmin etc) does the table exist? Do other civicrm tables exist?
    – Aidan
    Commented May 5, 2023 at 9:28
  • Hi, thanks! How do I access CivicRM log? I logged in the database through Adminer and I can see 12 tables, all starting with wp_.... Not sure how civicrm tables look like, but I would say none exists.
    – jjosseff
    Commented May 6, 2023 at 23:08
  • I have similar issue. Is there any resolution for this? Regards,
    – Edi
    Commented Mar 8 at 7:52

1 Answer 1

0

Based on that screenshot - for whatever reason, the CiviCRM data wasn't loaded into the database. Is it intentional that your MySQL database name for CiviCRM is local?

You can probably work around this by manually loading the contents of civicrm_generated.mysql (found in <webroot>/wp-content/plugins/civicrm/civicrm/sql) into the database you specified as the CiviCRM database (which you can also double-check in <webroot>/wp-content/uploads/civicrm.settings.php in the CIVICRM_DSN constant).

2
  • Thanks a lot! Not sure about MySQL database name - Local is the name of the environment in which I run whole WP server on my local machine so maybe that is why. As for the workaround - I am able to find CIVICRM_DSN in civicrm.settings.php on the line starting with "define" - but I am not sure which file it references to. else { define('CIVICRM_DSN', 'mysql://root:root@localhost/local?new_link=true'); }
    – jjosseff
    Commented May 6, 2023 at 22:55
  • @jjosseff That isn't a file - that's a MySQL connection string. Compare it to the database connection info in wp-config.php. The format is <database software>://<user>:<password>@<server>/<database name>. So a) check that the user, password and server match wp-config.php. b) The database name can match WP or not - there are advantages to both - but if you didn't create a separate database manually using phpMyAdmin or similar, the database should be the same as WP. If WP is working, update the CIVICRM_DSM to match. CIVICRM_UF_DSN should always match wp-config.php. Commented May 8, 2023 at 16:00

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.