WordPress | エラー「削除に失敗しました」の解決方法

WordPressでプラグインの削除を試みたところ,エラー「削除に失敗しました」が発生した.そのため,当該エラーの解決方法を以下に記す.
背景
WordPressで重大なエラーがあり,ログインすることができなくなった.FileZilla Client (FTP Application)を利用し,すべてのプラグインを停止したところ,ログインすることができた.
原因と思われるプラグインの削除を試みたが,以下のようなエラー「削除に失敗しました」が発生した.
本記事では当該エラーの解決方法を以下に記す.

エラーの解決方法
最初にFileZilla Clientから削除を試みたが,Permission Deniedになり,削除することができなかった.そのため,Tera Termから削除を試みる.
Tera Termを開く.

以下画面が現れるので,Host名を記入し,"OK"をクリックする.

以下画面に遷移するので,適切な情報を入力し,"OK"をクリックする.

以下画面が出現する.

以下コマンドを実行し,"wp-content"のディレクトリに移動する.
$ cd /var/www/html/wp-content
[wp-content]$
“wp-content"のディレクトリで,以下コマンドを実行し,"plugins"のディレクトリがあるかを確認できた.
[wp-content]$ ls -l
total 16
drwxr-xr-x 5 apache apache 148 Sep 11 15:16 fonts
-rw-r--r-- 1 apache apache 28 Jan 8 2012 index.php
drwxr-xr-x 4 apache apache 4096 Aug 24 09:01 languages
drwxr-xr-x 2 apache apache 6 Feb 7 2022 mu-plugins
drwxr-xr-x 8 apache apache 170 Sep 11 18:48 plugins
drwxr-xr-x 10 apache apache 154 Sep 11 16:03 themes
drwxr-xr-x 3 apache apache 4096 Sep 11 17:08 updraft
drwxr-xr-x 2 apache apache 6 Sep 11 15:58 upgrade
drwxr-xr-x 4 apache apache 42 Feb 3 2022 uploads
以下コマンドを実行し,"plugins"のディレクトリに移動する.
[wp-content]$ cd ./plugins
[plugins]$
以下コマンドを実行し,"highlighting-code-block"のディレクトリを確認する.
[plugins]$ ls -l
total 8
drwxr-xr-x 4 apache apache 312 Sep 8 18:19 akismet
drwxr-xr-x 2 apache apache 60 Feb 13 2022 copy-permalink-to-clipboard
drwxr-xr-x 7 apache apache 127 Sep 8 18:19 easy-fancybox
drwxr-xr-x 7 apache apache 186 Sep 11 20:28 highlighting-code-block
-rw-r--r-- 1 apache apache 28 Jun 5 2014 index.php
drwxr-xr-x 6 apache apache 167 Sep 9 08:17 php-compatibility-checker
drwxrwxr-x 5 apache apache 147 May 26 15:32 tinymce-advanced
drwxr-xr-x 11 apache apache 4096 Sep 11 15:58 updraftplus
以下コマンドを実行し,"Highlighting Code Block"のディレクトリ(highlighting-code-block)を削除する.
[plugins]$ sudo rm -r highlighting-code-block
以下コマンドを実行し,"highlighting-code-block"のディレクトリが削除されたことを確認することができる.
[plugins]$ ls -l
total 8
drwxr-xr-x 4 apache apache 312 Sep 8 18:19 akismet
drwxr-xr-x 2 apache apache 60 Feb 13 2022 copy-permalink-to-clipboard
drwxr-xr-x 7 apache apache 127 Sep 8 18:19 easy-fancybox
-rw-r--r-- 1 apache apache 28 Jun 5 2014 index.php
drwxr-xr-x 6 apache apache 167 Sep 9 08:17 php-compatibility-checker
drwxrwxr-x 5 apache apache 147 May 26 15:32 tinymce-advanced
drwxr-xr-x 11 apache apache 4096 Sep 11 15:58 updraftplus
以上