0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【2025年版】Wordpressでデバッグする時に wp-config.php に設定すべきもの

Last updated at Posted at 2025-03-04

ずばり これなの

wp-config.php
if(1) {
	// 必ず必須
	define('WP_DEBUG', true);

	// デバッグログを出力する
	define('WP_DEBUG_LOG', true);

	// 画面に出力する
	define('WP_DEBUG_DISPLAY', true);
	ini_set('display_errors', 1);

	// 非奨励関数を使用するとき
	define('SCRIPT_DEBUG', true);
	define('SAVEQUERIES', true); // SQLクエリのログを記録
}

if(1) { ~ } をつける理由

これをつけることにより、0 にするだけで簡単にデバッグ環境を止めることができます

これ以外のものはコメントアウトして対応してください

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?