الانتقال إلى المحتوى
الأدوات

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 ويصبح آمنًا.

أين يذهب سجل تتبّع أخطاء WordPress؟

إلى wp-content/debug.log افتراضيًا. جدير بالمعرفة: على كثير من الاستضافات يكون ذلك الملف قابلًا للجلب علنًا — يمكن لأي أحد طلبه في المتصفح. يمكنك تمرير مسار إلى WP_DEBUG_LOG بدلًا من ذلك وكتابة السجل فوق الجذر الرئيسي، وهو ما ستولّده لك هذه الأداة.

ضبطت WP_DEBUG على true ولم يحدث شيء. لماذا؟

شبه دائمًا لأن الثابت أُضيف أسفل السطر الذي يقول "That's all, stop editing!" في wp-config.php. كل شيء بعد ذلك السطر يُتجاهل. انقله إلى الأعلى.