サイトアドレスとurlアドレスの差をつけて、ログインurlを見つけにくくするための記述
1.ルートにindex.phpと.htaccessを作成し、以下の内容をいれる。
【index.php】
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
【.htaccess】
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
2.一階層下に任意のディレクトリを作り、その中にwordpressをインストール。
3.ログイン後、サイトアドレスにアドレスを入力。
4.wordpressアドレスには、作成したディレクトリ名を追加する。
5.function.phpに以下を入力し、ログイン画面へのリダイレクトを阻止する。
remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );