<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>debug.log &#8211; 워드프레스 가이드</title>
	<atom:link href="https://www.wp-guide.co.kr/tag/debug-log/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wp-guide.co.kr</link>
	<description>워드프레스 사용법 완벽정리/ 블로그,홈페이지 제작에 대한 모든 정보를 전달합니다. 주제별 테마,플러그인등 다양한 워드프레스 정보를 확인하세요.</description>
	<lastBuildDate>Mon, 23 Feb 2026 01:55:29 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.wp-guide.co.kr/wp-content/uploads/2024/02/favicon_padding-148x148.png</url>
	<title>debug.log &#8211; 워드프레스 가이드</title>
	<link>https://www.wp-guide.co.kr</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>워드프레스 디버그 완벽 가이드 — WP_DEBUG부터 Query Monitor까지</title>
		<link>https://www.wp-guide.co.kr/%ec%9b%8c%eb%93%9c%ed%94%84%eb%a0%88%ec%8a%a4-%eb%94%94%eb%b2%84%ea%b7%b8-%ec%99%84%eb%b2%bd-%ea%b0%80%ec%9d%b4%eb%93%9c-wp_debug%eb%b6%80%ed%84%b0-query-monitor%ea%b9%8c%ec%a7%80/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25ec%259b%258c%25eb%2593%259c%25ed%2594%2584%25eb%25a0%2588%25ec%258a%25a4-%25eb%2594%2594%25eb%25b2%2584%25ea%25b7%25b8-%25ec%2599%2584%25eb%25b2%25bd-%25ea%25b0%2580%25ec%259d%25b4%25eb%2593%259c-wp_debug%25eb%25b6%2580%25ed%2584%25b0-query-monitor%25ea%25b9%258c%25ec%25a7%2580</link>
					<comments>https://www.wp-guide.co.kr/%ec%9b%8c%eb%93%9c%ed%94%84%eb%a0%88%ec%8a%a4-%eb%94%94%eb%b2%84%ea%b7%b8-%ec%99%84%eb%b2%bd-%ea%b0%80%ec%9d%b4%eb%93%9c-wp_debug%eb%b6%80%ed%84%b0-query-monitor%ea%b9%8c%ec%a7%80/#respond</comments>
		
		<dc:creator><![CDATA[kthemeguide]]></dc:creator>
		<pubDate>Mon, 23 Feb 2026 01:03:31 +0000</pubDate>
				<category><![CDATA[에러 & 트러블슈팅]]></category>
		<category><![CDATA[debug.log]]></category>
		<category><![CDATA[PHP오류]]></category>
		<category><![CDATA[QueryMonitor]]></category>
		<category><![CDATA[WP_DEBUG]]></category>
		<category><![CDATA[사이트상태]]></category>
		<category><![CDATA[에러진단]]></category>
		<category><![CDATA[워드프레스]]></category>
		<category><![CDATA[워드프레스디버그]]></category>
		<category><![CDATA[워드프레스오류해결]]></category>
		<category><![CDATA[카페24]]></category>
		<guid isPermaLink="false">https://www.wp-guide.co.kr/?p=8685</guid>

					<description><![CDATA[워드프레스 디버그 방법을 총정리합니다. WP_DEBUG 설정, debug.log 분석, Query Monitor 플러그인, 브라우저 DevTools, 서버 에러 로그까지 에러 원인 파악에 필요한 모든 방법을 안내합니다.]]></description>
										<content:encoded><![CDATA[
<p>워드프레스에서 에러가 발생했을 때 가장 중요한 것은 <strong>정확한 오류 원인을 파악</strong>하는 것입니다. 원인을 모른 채 해결책만 시도하면 시간이 낭비되고 문제가 악화될 수<br />
            있습니다. 이 가이드에서는 워드프레스 에러 진단에 사용하는 <strong>모든 디버그 방법</strong>을 단계별로 안내합니다.</p>
<p>이 글은 <a href="https://www.wp-guide.co.kr/wordpress-error-guide/">워드프레스 에러 해결 완벽 가이드</a>와 연계한 심층 가이드입니다.</p>
<p>        <img decoding="async" src="https://www.wp-guide.co.kr/wp-content/uploads/2026/02/22_wp_debug_hero.jpg"
            alt="워드프레스 디버그 모드 설정 — wp-config.php에 WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY 설정"></p>
<h2>목차</h2>
<ul>
<li><a href="#debug-basics">1. 디버그란 무엇이고 왜 필요한가?</a></li>
<li><a href="#wp-debug">2. WP_DEBUG — 기본 디버그 모드</a></li>
<li><a href="#debug-log">3. debug.log 파일 분석 방법</a></li>
<li><a href="#query-monitor">4. Query Monitor 플러그인 활용</a></li>
<li><a href="#site-health">5. 사이트 상태(Site Health) 도구</a></li>
<li><a href="#plugin-conflict">6. 플러그인·테마 충돌 디버그</a></li>
<li><a href="#browser-devtools">7. 브라우저 개발자 도구 활용</a></li>
<li><a href="#server-logs">8. 서버 에러 로그 확인 (카페24)</a></li>
<li><a href="#advanced">9. 고급 디버그 기법</a></li>
<li><a href="#faq">10. 자주 묻는 질문 (FAQ)</a></li>
</ul>
<h2 id="debug-basics">1. 디버그란 무엇이고 왜 필요한가?</h2>
<p>디버그(Debug)는 소프트웨어의 오류(버그)를 찾아내고 제거하는 과정입니다. 워드프레스에서 에러가 발생하면 단순히 &#8220;에러가 났다&#8221;는 사실만으로는 원인을 찾기 어렵습니다. 디버그 도구를 사용하면<br />
            <strong>정확히 어느 파일의 몇 번째 줄에서 무슨 오류가 발생했는지</strong>를 알 수 있어 빠른 해결이 가능합니다.</p>
<h3>워드프레스 디버그 도구 전체 목록</h3>
<table>
<thead>
<tr>
<th>도구</th>
<th>유형</th>
<th>주요 용도</th>
<th>난이도</th>
</tr>
</thead>
<tbody>
<tr>
<td>WP_DEBUG</td>
<td>내장 기능</td>
<td>PHP 오류 감지 및 기록</td>
<td>초급</td>
</tr>
<tr>
<td>debug.log</td>
<td>내장 기능</td>
<td>오류 로그 파일 분석</td>
<td>초급</td>
</tr>
<tr>
<td>Query Monitor</td>
<td>플러그인</td>
<td>DB 쿼리·훅·REST API 분석</td>
<td>중급</td>
</tr>
<tr>
<td>사이트 상태</td>
<td>내장 기능</td>
<td>서버 환경·플러그인 점검</td>
<td>초급</td>
</tr>
<tr>
<td>브라우저 DevTools</td>
<td>브라우저</td>
<td>JS 오류·네트워크·CSS 분석</td>
<td>중급</td>
</tr>
<tr>
<td>서버 에러 로그</td>
<td>호스팅</td>
<td>서버 레벨 오류 확인</td>
<td>중급</td>
</tr>
</tbody>
</table>
<h2 id="wp-debug">2. WP_DEBUG — 기본 디버그 모드</h2>
<p>WP_DEBUG는 워드프레스에 내장된 가장 기본적인 디버그 시스템입니다. <code>wp-config.php</code> 파일에 상수 값을 설정하여 동작합니다.</p>
<h3>WP_DEBUG 설정 방법</h3>
<p>카페24 파일 관리자 또는 FTP로 WordPress 루트의 <code>wp-config.php</code> 파일을 열고,<br />
            <code>/* That's all, stop editing! */</code> 줄 바로 위에 아래 코드를 추가합니다.</p>
<pre><code>// ===== 디버그 설정 시작 =====
define('WP_DEBUG', true);           // 디버그 모드 활성화
define('WP_DEBUG_LOG', true);       // debug.log 파일에 오류 기록
define('WP_DEBUG_DISPLAY', false);  // 화면에 오류 표시 안 함 (운영 환경 필수)
define('SCRIPT_DEBUG', true);       // 압축되지 않은 JS/CSS 로드
// ===== 디버그 설정 끝 =====</code></pre>
<h3>각 상수의 역할</h3>
<h4>WP_DEBUG</h4>
<ul>
<li><strong>true</strong>: PHP 오류, 경고, 알림을 모두 감지합니다.</li>
<li><strong>false</strong> (기본값): 오류를 감지하지 않습니다.</li>
<li>운영 사이트에서는 false로 유지해야 합니다.</li>
</ul>
<h4>WP_DEBUG_LOG</h4>
<ul>
<li><strong>true</strong>: 발생한 모든 오류를 <code>/wp-content/debug.log</code> 파일에 기록합니다.</li>
<li>WP_DEBUG_DISPLAY가 false여도 로그 파일에는 계속 기록됩니다.</li>
<li>파일 경로를 직접 지정할 수도 있습니다: <code>define('WP_DEBUG_LOG', '/home/user/logs/debug.log');</code></li>
</ul>
<h4>WP_DEBUG_DISPLAY</h4>
<ul>
<li><strong>true</strong>: 오류 메시지를 화면(브라우저)에 직접 표시합니다.</li>
<li><strong>false</strong> (권장): 화면에는 표시하지 않고 log 파일에만 기록합니다.</li>
<li>운영 사이트에서 true로 설정하면 방문자에게 오류 코드가 노출되어 보안에 위험합니다.</li>
</ul>
<h4>SCRIPT_DEBUG</h4>
<ul>
<li><strong>true</strong>: 워드프레스가 압축·최소화된 JS/CSS 대신 원본 파일을 로드합니다.</li>
<li>JavaScript 오류 디버그 시 유용합니다.</li>
</ul>
<h3>디버그 완료 후 반드시 비활성화</h3>
<p>디버그 작업이 끝나면 반드시 아래와 같이 변경하시기 바랍니다.</p>
<pre><code>define('WP_DEBUG', false);
// WP_DEBUG_LOG, WP_DEBUG_DISPLAY 줄은 삭제하거나 주석 처리</code></pre>
<h2 id="debug-log">3. debug.log 파일 분석 방법</h2>
<p><code>debug.log</code>는 워드프레스가 감지한 PHP 오류를 시간순으로 기록하는 텍스트 파일입니다. WP_DEBUG와 WP_DEBUG_LOG가 모두 true일 때<br />
            <code>/wp-content/debug.log</code> 경로에 자동 생성됩니다.</p>
<p>        <img decoding="async" src="https://www.wp-guide.co.kr/wp-content/uploads/2026/02/22_wp_debug_log_viewer.jpg"
            alt="debug.log 파일 분석 — PHP Fatal error(빨강), Warning(주황), Notice(노랑), Deprecated(회색) 오류 유형별 구분"></p>
<h3>debug.log 파일 열기</h3>
<ol>
<li>카페24 파일 관리자 → <code>/www/wp-content/</code> 폴더</li>
<li><code>debug.log</code> 파일을 클릭하여 내용 확인 (또는 FTP로 다운로드)</li>
<li>파일이 보이지 않으면 [숨김 파일 보기]를 활성화합니다.</li>
</ol>
<h3>오류 유형별 의미</h3>
<table>
<thead>
<tr>
<th>오류 유형</th>
<th>심각도</th>
<th>의미</th>
<th>대응</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Fatal error</strong></td>
<td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f534.png" alt="🔴" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 치명적</td>
<td>스크립트 실행 중단. 사이트 다운 원인</td>
<td>즉시 해결 필요</td>
</tr>
<tr>
<td><strong>Parse error</strong></td>
<td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f534.png" alt="🔴" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 치명적</td>
<td>PHP 문법 오류. 코드를 실행할 수 없음</td>
<td>즉시 해결 필요</td>
</tr>
<tr>
<td><strong>Warning</strong></td>
<td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e0.png" alt="🟠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 경고</td>
<td>실행은 되지만 잠재적 문제 존재</td>
<td>가능한 빠른 해결</td>
</tr>
<tr>
<td><strong>Notice</strong></td>
<td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 알림</td>
<td>권장되지 않는 방식 사용</td>
<td>여유 있을 때 해결</td>
</tr>
<tr>
<td><strong>Deprecated</strong></td>
<td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26aa.png" alt="⚪" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 정보</td>
<td>더 이상 지원되지 않는 함수 사용</td>
<td>업데이트 시 해결</td>
</tr>
</tbody>
</table>
<h3>debug.log에서 원인을 빠르게 찾는 방법</h3>
<ol>
<li><strong>&#8220;Fatal error&#8221;</strong> 키워드로 검색합니다. (Ctrl+F 또는 Cmd+F)</li>
<li>오류 메시지에서 파일 경로를 확인합니다. 예: <code>/wp-content/plugins/plugin-name/class.php on line 123</code></li>
<li>경로에 <code>plugins/플러그인명</code>이 있으면 해당 플러그인이 원인입니다.</li>
<li>경로에 <code>themes/테마명</code>이 있으면 테마가 원인입니다.</li>
</ol>
<h3>debug.log 주요 오류 패턴</h3>
<pre><code># 플러그인 함수 충돌 (두 플러그인이 같은 함수명 사용)
Fatal error: Cannot redeclare function_name() ... in /plugins/plugin-a/file.php

# 정의되지 않은 함수 호출 (플러그인 누락 또는 비활성화)
Fatal error: Call to undefined function plugin_function() in /plugins/plugin-b/file.php

# 메모리 부족
Fatal error: Allowed memory size of 134217728 bytes exhausted

# PHP 버전 비호환
Fatal error: Uncaught TypeError: Argument must be of type string, bool given</code></pre>
<h2 id="query-monitor">4. Query Monitor 플러그인 활용</h2>
<p>Query Monitor는 워드프레스의 성능과 오류를 실시간으로 분석하는 개발자용 플러그인입니다. 데이터베이스 쿼리, PHP 오류, HTTP API 호출, 훅(Hook) 등 매우 상세한 정보를<br />
            관리자 바에서 바로 확인할 수 있습니다.</p>
<p>        <img decoding="async" src="https://www.wp-guide.co.kr/wp-content/uploads/2026/02/22_wp_query_monitor.jpg" alt="Query Monitor 플러그인 — DB 쿼리 수, 실행 시간, 메모리 사용량, 느린 쿼리 목록 실시간 확인"></p>
<h3>Query Monitor 설치 방법</h3>
<ol>
<li>워드프레스 관리자 → <strong>[플러그인]</strong> → <strong>[새 플러그인 추가]</strong></li>
<li>&#8220;Query Monitor&#8221; 검색 후 설치 및 활성화</li>
<li>사이트에 접속하면 관리자 바에 <strong>&#8220;0.43s / 42 queries / 8.5 MB&#8221;</strong> 형태의 통계가 표시됩니다.</li>
</ol>
<h3>Query Monitor 주요 패널 설명</h3>
<h4>Queries (데이터베이스 쿼리)</h4>
<ul>
<li>페이지 로드 시 실행된 모든 SQL 쿼리를 표시합니다.</li>
<li>실행 시간이 긴 쿼리(느린 쿼리)는 붉은색으로 강조됩니다.</li>
<li><strong>Caller</strong> 컬럼에서 해당 쿼리를 발생시킨 플러그인/테마를 확인합니다.</li>
<li>0.05초 이상 걸리는 쿼리는 최적화 대상입니다.</li>
</ul>
<h4>PHP Errors (PHP 오류)</h4>
<ul>
<li>debug.log 없이도 PHP 오류를 실시간으로 확인할 수 있습니다.</li>
<li>Fatal, Warning, Notice, Deprecated 등 모든 오류 유형을 표시합니다.</li>
</ul>
<h4>Hooks (훅)</h4>
<ul>
<li>페이지 로드 시 실행된 모든 WordPress 훅(action/filter)을 표시합니다.</li>
<li>특정 훅이 예상대로 실행되는지 확인할 때 유용합니다.</li>
</ul>
<h4>HTTP API Calls</h4>
<ul>
<li>외부 API 호출(결제 게이트웨이, 지도, 소셜 로그인 등)을 모니터링합니다.</li>
<li>느린 외부 API 응답이 504 에러를 유발하는지 확인할 수 있습니다.</li>
</ul>
<h4>Request (요청 정보)</h4>
<ul>
<li>현재 페이지의 WordPress 쿼리 변수, 매칭된 rewrite rule 등을 표시합니다.</li>
<li>404 에러나 퍼머링크 문제 디버그에 유용합니다.</li>
</ul>
<h2 id="site-health">5. 사이트 상태(Site Health) 도구</h2>
<p>워드프레스 내장 사이트 상태 도구는 서버 환경, 플러그인 호환성, 보안 설정 등을 자동으로 점검하고 개선 방법을 안내합니다.</p>
<h3>접근 방법</h3>
<p>워드프레스 관리자 → <strong>[도구]</strong> → <strong>[사이트 상태]</strong></p>
<h3>주요 점검 항목</h3>
<h4>[상태] 탭</h4>
<ul>
<li><strong>치명적 문제</strong> (빨강): 즉시 해결이 필요한 항목입니다.</li>
<li><strong>권장 사항</strong> (노랑): 개선하면 좋은 항목입니다.</li>
<li><strong>통과</strong> (녹색): 정상 상태인 항목입니다.</li>
</ul>
<h4>[정보] 탭</h4>
<ul>
<li>PHP 버전, 메모리 한도, 최대 실행 시간 등 서버 정보</li>
<li>활성화된 플러그인과 테마 목록</li>
<li>데이터베이스 정보</li>
<li>파일 권한 상태</li>
</ul>
<p>사이트 상태 정보는 고객센터나 개발자에게 문제를 보고할 때도 유용합니다. <strong>[정보 복사]</strong> 버튼으로 전체 환경 정보를 클립보드에 복사할 수 있습니다.</p>
<h2 id="plugin-conflict">6. 플러그인·테마 충돌 디버그</h2>
<p>워드프레스 에러의 상당수는 플러그인 또는 테마 간의 충돌에서 발생합니다. 체계적으로 원인을 격리하는 방법을 안내합니다.</p>
<h3>플러그인 비활성화 테스트 (이분 탐색법)</h3>
<p>활성화된 플러그인이 많을 때 빠르게 원인을 찾는 방법입니다.</p>
<ol>
<li>활성화된 플러그인의 절반을 비활성화합니다.</li>
<li>에러가 해결되면 방금 비활성화한 플러그인 중에 원인이 있습니다.</li>
<li>해당 그룹을 다시 절반씩 나누어 반복합니다.</li>
<li>원인 플러그인을 찾을 때까지 반복합니다.</li>
</ol>
<h3>관리자 화면 접속이 불가능할 때 (FTP 사용)</h3>
<ol>
<li>카페24 파일 관리자 → <code>/www/wp-content/</code></li>
<li><code>plugins</code> 폴더명을 <code>plugins_disabled</code>로 변경 → 전체 비활성화</li>
<li>문제 해결 시 폴더명 원래대로 복구 → 플러그인을 하나씩 활성화하여 원인 탐색</li>
</ol>
<h3>기본 테마로 전환하여 테마 원인 확인</h3>
<ol>
<li>관리자가 열린다면: 외모 → 테마 → Twenty Twenty-Four 활성화</li>
<li>관리자가 열리지 않는다면: FTP로 현재 테마 폴더명 변경</li>
<li>에러 해결 시 테마가 원인 → 테마 업데이트 또는 재설치</li>
</ol>
<h2 id="browser-devtools">7. 브라우저 개발자 도구 활용</h2>
<p>PHP 오류가 아닌 JavaScript 오류, CSS 깨짐, 느린 리소스 로딩 등은 브라우저 개발자 도구에서 확인합니다.</p>
<h3>개발자 도구 열기</h3>
<ul>
<li><strong>Chrome/Edge</strong>: F12 또는 Ctrl+Shift+I (Mac: Cmd+Option+I)</li>
<li><strong>Firefox</strong>: F12 또는 Ctrl+Shift+I</li>
</ul>
<h3>주요 탭별 활용법</h3>
<h4>Console 탭</h4>
<ul>
<li>JavaScript 오류를 확인합니다.</li>
<li>빨간색 오류 메시지가 있으면 해당 스크립트 파일과 줄 번호를 확인합니다.</li>
<li>워드프레스 관리자 화면이 깨지거나 JS 기능이 동작하지 않을 때 필수 확인 항목입니다.</li>
</ul>
<h4>Network 탭</h4>
<ul>
<li>페이지 로드 시 모든 HTTP 요청과 응답 코드를 확인합니다.</li>
<li>404(빨강), 500, 502, 503 등 에러 응답이 있는 요청을 찾습니다.</li>
<li>느리게 로드되는 리소스를 파악합니다.</li>
</ul>
<h4>Application 탭</h4>
<ul>
<li>캐시, 쿠키, 로컬 스토리지 데이터를 확인하고 삭제할 수 있습니다.</li>
<li>캐시 문제로 의심될 때 모든 캐시를 삭제하고 테스트합니다.</li>
</ul>
<h2 id="server-logs">8. 서버 에러 로그 확인 (카페24)</h2>
<p>PHP Fatal Error가 WordPress가 감지하기 전에 서버 레벨에서 발생하는 경우 WordPress의 debug.log에 기록되지 않을 수 있습니다. 이때는 서버 에러 로그를 직접<br />
            확인합니다.</p>
<h3>카페24에서 에러 로그 확인 방법</h3>
<ol>
<li>카페24 호스팅 관리자 → <strong>[나의 서비스 관리]</strong> → <strong>[호스팅 관리]</strong></li>
<li><strong>[로그 관리]</strong> 또는 <strong>[에러 로그]</strong> 메뉴 클릭</li>
<li>날짜와 시간이 에러 발생 시점과 일치하는 항목을 찾습니다.</li>
</ol>
<h3>FTP로 직접 에러 로그 확인</h3>
<p>카페24의 에러 로그는 일반적으로 아래 경로에 있습니다.</p>
<pre><code># 카페24 에러 로그 일반 경로
/www/logs/error.log
/logs/php-error.log</code></pre>
<h2 id="advanced">9. 고급 디버그 기법</h2>
<h3>var_dump와 error_log를 활용한 임시 디버그</h3>
<p>특정 변수의 값을 확인하거나 코드 실행 흐름을 추적할 때 사용합니다.</p>
<pre><code>// debug.log에 변수 내용 기록
error_log('변수 확인: ' . print_r($variable, true));

// 배열 또는 객체 전체 내용 확인
error_log(var_export($array, true));

// 실행 시점 확인
error_log('이 코드가 실행됨 — ' . date('Y-m-d H:i:s'));</code></pre>
<h3>wp_die()로 중간 값 확인</h3>
<pre><code>// 코드 실행을 중단하고 값 출력
wp_die('<pre>' . print_r($variable, true) . '</pre>
<p>');</code></p>
<p><strong>주의:</strong> 이 방법은 개발 환경에서만 사용하고, 운영 환경에서는 반드시 제거해야 합니다.</p>
<h3>SAVEQUERIES로 DB 쿼리 추적</h3>
<pre><code>// wp-config.php에 추가
define('SAVEQUERIES', true);

// 코드에서 사용
global $wpdb;
var_dump($wpdb->queries);  // 모든 실행된 쿼리 확인</code></pre>
<h3>Xdebug 연동 (고급)</h3>
<p>로컬 개발 환경(Local by Flywheel, XAMPP 등)에서 PHP Xdebug를 PHPStorm 또는 VS Code와 연동하면 브레이크포인트를 설정하여 코드를 단계별로 실행하며 디버그할<br />
            수 있습니다. 카페24 등 공유 호스팅에서는 직접 사용이 제한적입니다.</p>
<h3>디버그 전용 플러그인 목록</h3>
<ul>
<li><strong>Query Monitor</strong>: 가장 강력한 무료 디버그 플러그인</li>
<li><strong>Debug Bar</strong>: 관리자 바에 디버그 정보 추가</li>
<li><strong>WP Crontrol</strong>: WordPress cron 작업 모니터링</li>
<li><strong>Health Check &amp; Troubleshooting</strong>: 관리자만 디버그 모드 적용 가능</li>
</ul>
<h2 id="faq">10. 자주 묻는 질문 (FAQ)</h2>
<h3>Q. WP_DEBUG를 활성화해도 debug.log 파일이 생성되지 않아요.</h3>
<p>WP_DEBUG_LOG를 true로 설정했는지 확인하고, <code>wp-content</code> 폴더에 쓰기 권한(755)이 있는지 확인하시기 바랍니다. 또는<br />
            <code>wp-content</code> 폴더 안에 빈 <code>debug.log</code> 파일을 미리 만들고 권한을 644로 설정하면 됩니다.</p>
<h3>Q. 디버그가 끝난 후 WP_DEBUG를 다시 끄는 방법은?</h3>
<p><code>wp-config.php</code>에서 <code>define('WP_DEBUG', true)</code>를 <code>define('WP_DEBUG', false)</code>로<br />
            변경하면 됩니다. 운영 환경에서는 반드시 디버그 모드를 비활성화해야 합니다. <code>WP_DEBUG_DISPLAY</code>를 <code>false</code>로 유지하면 화면에 오류<br />
            메시지가 노출되지 않습니다.</p>
<h3>Q. Query Monitor와 Debug Bar 중 어느 것을 사용해야 하나요?</h3>
<p>Query Monitor를 권장합니다. Debug Bar보다 훨씬 많은 정보(DB 쿼리, 훅, REST API, 블록 에디터 데이터 등)를 제공하며 인터페이스가 더 직관적입니다. 두 플러그인 모두<br />
            무료로 사용할 수 있습니다.</p>
<h3>Q. 운영 중인 사이트에서 디버그 모드를 켜도 되나요?</h3>
<p><code>WP_DEBUG_DISPLAY</code>를 반드시 <code>false</code>로 설정한 상태에서만 켜시기 바랍니다. 이 설정을 지키면 방문자 화면에 오류 메시지가 노출되지 않고<br />
            <code>debug.log</code>에만 기록됩니다. 디버그 완료 후에는 <code>WP_DEBUG</code>를 <code>false</code>로 되돌리는 것을 잊지 마시기 바랍니다.
        </p>
<h3>Q. debug.log 파일이 너무 커져서 관리가 어려워요.</h3>
<p>디버그 작업 후 <code>WP_DEBUG</code>를 다시 <code>false</code>로 변경하고 <code>debug.log</code> 파일을 삭제하면 됩니다. 또는 WP<br />
            Crontrol 플러그인으로 정기적으로 로그 파일을 정리하도록 설정할 수 있습니다.</p>
<h2>정리 — 워드프레스 디버그, 이렇게 진행하세요</h2>
<p>워드프레스 디버그의 기본 순서는 아래와 같습니다.</p>
<ol>
<li><strong>WP_DEBUG 활성화</strong> → debug.log에서 Fatal error 확인</li>
<li>오류 메시지의 <strong>파일 경로</strong>로 원인 플러그인/테마 파악</li>
<li>해당 플러그인/테마 <strong>비활성화</strong>로 확인</li>
<li>결원이 특정되지 않으면 <strong>이분 탐색법</strong>으로 플러그인 범위 좁히기</li>
<li><strong>Query Monitor</strong>로 DB 쿼리·성능 문제 추가 점검</li>
<li>브라우저 <strong>DevTools Console</strong>로 JS 오류 확인</li>
<li>해결 후 <strong>WP_DEBUG 비활성화</strong></li>
</ol>
<p>에러 코드별 구체적인 해결 방법은 아래 가이드를 참고하시기 바랍니다.</p>
<ul>
<li><a href="https://www.wp-guide.co.kr/wordpress-error-guide/">워드프레스 에러 해결 완벽 가이드 (전체 에러 총정리)</a></li>
<li><a href="https://www.wp-guide.co.kr/wordpress-php-fatal-error/">워드프레스 PHP Fatal Error 해결 가이드</a></li>
<li><a href="https://www.wp-guide.co.kr/wordpress-500-internal-server-error/">워드프레스 500 Internal Server<br />
                    Error 해결 가이드</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wp-guide.co.kr/%ec%9b%8c%eb%93%9c%ed%94%84%eb%a0%88%ec%8a%a4-%eb%94%94%eb%b2%84%ea%b7%b8-%ec%99%84%eb%b2%bd-%ea%b0%80%ec%9d%b4%eb%93%9c-wp_debug%eb%b6%80%ed%84%b0-query-monitor%ea%b9%8c%ec%a7%80/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
