Answers.Body: <p>It sounds like you still have a civicrm.settings.php file. To uninstall you need to delete that too.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-25T12:47:38.677Z
Answers.Text: Before to say a YES I controlled some old backup too. It's correct, thank you very much
Answers.UserDisplayName: Francesco Garganese
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-24T12:17:50.453Z
Answers.LastActivityDate: 2021-03-24T12:17:50.453Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>You have to delete the 'civicrm' folder in 'wp-content/uploads' to be able to reinstall the plugin</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-08T17:28:35.373Z
Answers.LastActivityDate: 2023-04-08T17:28:35.373Z
Answers.UserDisplayName: rsessa
Body: <p>Uninstall CiviCRM from WordPress, is creating me a big issue.</p>
  <p>I needed to uninstall CiviCRM (5.31.1) from a production site, saving all theme and others settings.
  CiviCRM went away without uninstall its db data. So:</p>
  <ol>
  <li>I tried to delete the tables using phpmyadmin, failing</li>
  <li>From command line, I dropped the db and I recreated it from a dump, cutting away the CiviCRM part, maining all tables without <code>wp_</code> prefix; doing this the Wordpress site operate all as well.</li>
  </ol>
  <p>Some days ago it was necessay to reinstall CiviCRM... All was good until we clicked the plugin enable link, recieving this page:</p>
  <pre><code>Initialization Error
  
  Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; simpleHandler
          )
  
      [code] =&gt; -18
      [message] =&gt; DB Error: no such table
      [mode] =&gt; 16
      [debug_info] =&gt; SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
  FROM civicrm_setting
  WHERE (domain_id = 1) AND (is_domain = 1)
   [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]
      [type] =&gt; DB_Error
      [user_info] =&gt; SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
  FROM civicrm_setting
  WHERE (domain_id = 1) AND (is_domain = 1)
   [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]
      [to_string] =&gt; [db_error: message=&quot;DB Error: no such table&quot; code=-18 mode=callback callback=CRM_Core_Error::simpleHandler prefix=&quot;&quot; info=&quot;SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
  FROM civicrm_setting
  WHERE (domain_id = 1) AND (is_domain = 1)
   [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]&quot;]
  </code></pre>
  <p>Where old CiviCRM data are still inside db?</p>
  <p>Did someone prepare a SQL script performing correct db uninstall?</p>
  <p>Could be possibile to add the data delete checkbox during plugin uninstall process, like in many others Wordpress plugins?</p>
  <p>TIA -- Francesco</p>
  
Tags: <wordpress><database><installation><settings>
Title: CiviCRM WordPress uninstall - db issue
ThreadText: # CiviCRM WordPress uninstall - db issue
  
  (Asked by: username_0 on 2021-03-24)
  
  Uninstall CiviCRM from WordPress, is creating me a big issue.
  
  I needed to uninstall CiviCRM (5.31.1) from a production site, saving all theme and others settings.
  CiviCRM went away without uninstall its db data. So:
  
  1. I tried to delete the tables using phpmyadmin, failing
  2. From command line, I dropped the db and I recreated it from a dump, cutting away the CiviCRM part, maining all tables without `wp_` prefix; doing this the Wordpress site operate all as well.
  
  Some days ago it was necessay to reinstall CiviCRM... All was good until we clicked the plugin enable link, recieving this page:
  
  ```
  Initialization Error
  
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )
  
      [code] => -18
      [message] => DB Error: no such table
      [mode] => 16
      [debug_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
  FROM civicrm_setting
  WHERE (domain_id = 1) AND (is_domain = 1)
   [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]
      [type] => DB_Error
      [user_info] => SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
  FROM civicrm_setting
  WHERE (domain_id = 1) AND (is_domain = 1)
   [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]
      [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
  FROM civicrm_setting
  WHERE (domain_id = 1) AND (is_domain = 1)
   [nativecode=1146 ** Table 'sat_wp2020.civicrm_setting' doesn't exist]"]
  
  ```
  
  Where old CiviCRM data are still inside db?
  
  Did someone prepare a SQL script performing correct db uninstall?
  
  Could be possibile to add the data delete checkbox during plugin uninstall process, like in many others Wordpress plugins?
  
  TIA -- username_0
  
  **Tags:** wordpress, database, installation, settings
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-03-24. Score: 2
  
  It sounds like you still have a civicrm.settings.php file. To uninstall you need to delete that too.
  
  > **Comments:**
  > **username_0**: Before to say a YES I controlled some old backup too. It's correct, thank you very much  
  
  ---
  
  ### Answer by username_2 on 2023-04-08. Score: 0
  
  You have to delete the 'civicrm' folder in 'wp-content/uploads' to be able to reinstall the plugin
  
  
  ---
  
  