WordPressインストール時のセキュリティ対策

セキュリティプラグインの導入

SiteGuard WP Plugin

・日本語表示
・ログイン履歴がない

All In One WP Security & Firewall

・英語表示
・SiteGuard WP Pluginより高機能(ログイン履歴が見れる)

不要な機能の制限

XML-RPCを無効にする

<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>

REST APIを無効にする

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} rest_route=
RewriteRule ^$ /? [R=404,L]
</IfModule>

wp-comments-post.phpへのアクセスを制限する

<Files wp-comments-post.php>
order allow,deny
deny from all
</Files>

作成者アーカイブの非表示

add_filter('author_rewrite_rules', '__return_empty_array');


posting from :pizzalot’s blog


この記事が気に入ったらサポートをしてみませんか?