דילוג לתוכן
כלים

WP_DEBUG Configurator

Turn on the debug log without breaking your live site

רץ בדפדפן שלכם. שום דבר לא מועלה.

Where is this site?

This changes the recommendation, not just the wording. The safe configuration on a live site is genuinely different from the useful one on your laptop.

Verdict

Options
wp-config.php

Paste these ABOVE the line that says /* That's all, stop editing! */ — anything below it is ignored, which is why so many people report that WP_DEBUG 'does nothing'.

אודות WP_DEBUG Configurator

Generate the WP_DEBUG constants that write errors to a log file instead of printing them to your visitors. The default WP_DEBUG snippet most sites copy will display PHP errors publicly — this one will not.

FAQ

שאלות

האם בטוח להפעיל WP_DEBUG באתר חי?

רק כש-WP_DEBUG_DISPLAY מוגדר ל-false. בפני עצמו, WP_DEBUG מדפיס הודעות ואזהרות של PHP — כולל נתיבי הקבצים המוחלטים של השרת שלכם — ישירות לתוך עמודים שהמבקרים שלכם טוענים. כמעט כל מדריך נותן לכם את השורה האחת הזו ועוצר. שלבו אותה עם WP_DEBUG_LOG ו-WP_DEBUG_DISPLAY false וזה בטוח.

לאן יומן ה-debug של וורדפרס הולך?

אל wp-content/debug.log כברירת מחדל. שווה לדעת: בהרבה שירותי אחסון הקובץ הזה ניתן לשליפה ציבורית — כל אחד יכול לבקש אותו בדפדפן. אפשר להעביר נתיב ל-WP_DEBUG_LOG במקום ולכתוב את היומן מעל שורש הווב, מה שהכלי הזה ייצר עבורכם.

הגדרתי WP_DEBUG ל-true ושום דבר לא קרה. למה?

כמעט תמיד כי הקבוע נוסף מתחת לשורה שאומרת "That's all, stop editing!" ב-wp-config.php. כל מה שאחרי השורה הזו מתעלמים ממנו. העבירו אותו למעלה.