WordPressを新規開設したときに、必ずすること、したほうがいいことをまとめる。
- wp-config.phpにセキュリティキーを入れる(2.7以降)
12345678
define(
'AUTH_KEY'
,
'put your unique phrase here'
);
define(
'SECURE_AUTH_KEY'
,
'put your unique phrase here'
);
define(
'LOGGED_IN_KEY'
,
'put your unique phrase here'
);
define(
'NONCE_KEY'
,
'put your unique phrase here'
);
define(
'AUTH_SALT'
,
'put your unique phrase here'
);
define(
'SECURE_AUTH_SALT'
,
'put your unique phrase here'
);
define(
'LOGGED_IN_SALT'
,
'put your unique phrase here'
);
define(
'NONCE_SALT'
,
'put your unique phrase here'
);
の部分を、secret-keyジェネレータからコピーしたものと差し換える。
- wp-config.phpのテーブルプレフィックスを”wp_”以外のものに変更する
- SSLが使用可能なら積極的に使う
使い方は、wp-config.phpで1define(’FORCE_SSL_ADMIN’, true);
- wp-config.phpを移動する(WordPress 2.6以降)
wp-config.phpをひとつ上の階層に移動させても動作するので、上の階層がブラウザからアクセス出来ない場合に効果的。 - wp-config.phpファイルを.htaccessで守る
12
Order deny,allow
deny from all
- wp-adminフォルダをhtaccessとhtpasswordで守る
- 最新版を維持する
参照:
納品の際に設定したいこと
- レビジョンを無効にする
wp-config.phpに1define(
'WP_POST_REVISIONS'
, false );
- coreやプラグインのアップデートを不可にする
wp-config.phpに1define(
'DISALLOW_FILE_MODS'
,true);
参照: