bbPressのデータを削除する

既定では、プラグインを無効化して削除してもbbPress はそれらのデータを削除しません。そのためbbPress の現在のインストールに問題がある場合には以前のデータを保持したままでプラグインのクリーンバージョンをインストールすることができます。

bbPress はもう使用しないと決めてbbPress がこれまで作成した全てのデータを削除する場合には、フォーラムをリセットツールを実行して全てのbbPress データを削除できます。

  1. WordPress の管理画面にログインします。
  2. ツール > フォーラム > フォーラムをリセット と進みます。
  3. 本当に実行してもよいですか ?” チェックボックスにチェックを入れます。
  4. 任意: bbPress をリセットする時に インポートしたユーザーを削除しますか ? にチェックを入れることもできます。これらのデータを削除するのに必要なメタデータも削除されます。
  5. bbPressのリセットをクリックします。

「変換テーブルの削除…失敗しました」と表示された場合、別のフォーラムシステムからインポートしていない場合にこれが表示されるのは通常のことです。これはインポートプロセス中に追加のデータベース テーブルが追加されるためです。

フォーラムリセットツールを使用するとカスタム投稿タイプ、トピックタグ分類、bbPressユーザーメタを含む全てのbbPress データがWordPress データベースから削除されます。

ただし、bbPress の古いバージョンではユーザー役割が完全に削除できないというバグがありました。(#2580を参照してください)

そのため、あなたがbbPress の古いバージョンを使用している場合は 子テーマの functions.php ファイルに以下の関数を追加してください。

$wp_roles = new WP_Roles();
$wp_roles->remove_role("bbp_keymaster");
$wp_roles->remove_role("bbp_moderator");
$wp_roles->remove_role("bbp_participant");
$wp_roles->remove_role("bbp_spectator");
$wp_roles->remove_role("bbp_blocked");

ウェブサイトを更新するとbbPress に関連する全てのユーザー役割がデータベースから削除されます。その後に子テーマの functions.php ファイルから上記コードを削除します。

こうして全ての bbPress データを削除した後で、bbPressのアンインストール作業に進むことができます。

原文を見る

Remove bbPress Data

By default bbPress does not delete any data if the plugin is deactivated and deleted, so that if you have a problem with your current installation of bbPress you can install a clean version of the plugin and still have all of your data like before.

If you ever decide to not run bbPress and you have made a choice in wanting to remove all of the previous data that bbPress has created, you can run the Reset Forums tool to remove all of your bbPress data.

  1. Log into your WordPress back-end.
  2. Go to Tools > Forums > Reset Forums.
  3. Check the “Are you sure you want to do this?” checkbox.
  4. Optional: You may also want to check Delete imported users? as once the bbPress is reset, the meta-data necessary to delete these users will also be removed.
  5. Click Reset bbPress.

Please know that if you see “Deleting Conversion Table… Failed“, it is normal to see this if you did not import from another forum system, as during the import process it adds an extra database table.

Using the Reset Forums tool will remove all bbPress data from your WordPress database, including custom post types, topic tag taxonomy, and bbPress user meta.

However, there was a bug in the older version of bbPress where bbPress will not completely remove the user roles.(See #2580)

So if you are using the older version of bbPress, add this function in your child themes functions.php file.

$wp_roles = new WP_Roles();
$wp_roles->remove_role("bbp_keymaster");
$wp_roles->remove_role("bbp_moderator");
$wp_roles->remove_role("bbp_participant");
$wp_roles->remove_role("bbp_spectator");
$wp_roles->remove_role("bbp_blocked");

Refresh your website, and now all bbPress related user roles have been removed from the database. After that you can remove the code from your child theme’s functions.php file.

Now after removing all the bbPress data, you can proceed to uninstalling bbPress.

https://codex.bbpress.org/getting-started/installing-bbpress/deleting-bbpress/

bbPressをアンインストールする

コアファイルが変更されて修正すべき重大な問題が発生しているためにbbPress の新バージョンをインストールしたい場合、もしくは単にもうこれ以上bbPress を使いたくないといった場合などは以下の手順に従ってサイトからbbPress をアンインストールします。

  1. WordPress の管理画面いログインします。
  2. プラグイン > インストール済みプラグインと進みます。
  3. bbPress が表示されるまでスクロールして無効化をクリックします。
  4. ページがリロードされたら bbPress プラグインまでスクロールして赤色の削除リンクをクリックします。
  5. bbPress プラグインの削除を確認する画面が表示されます。 インストールから bbPress を削除してもよい場合は、OKをクリックします。
  6. これであなたのサイトからbbPress がアンインストールされました。
原文を見る

Uninstall bbPress
If you ever need to install a fresh version of bbPress because the core files were modified, you are running through a severe issue that you want to try to fix, or that you just do not want to use bbPress anymore, you may follow these steps to uninstall bbPress from your site.

  1. Log into your WordPress back-end.
  2. Go to Plugins > Installed Plugins .
  3. Scroll down until you see bbPress and click Deactivate.
  4. After the page reloads , scroll back down to the bbPress plugin , now click the red Delete link.
  5. You will now see a screen to confirm your deletion of the bbPress plugin, if you are sure you want to remove bbPress from your installation, hit the OK. button.
  6. bbPress is now uninstalled from your site.
https://codex.bbpress.org/getting-started/installing-bbpress/deleting-bbpress/