المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : شرح تفعيل مود ( wp_debug ) في الووردبريس wordpress



Rise Company
08-06-2017, 16:41
شرح تفعيل مود ( wp_debug ) في الوردبرس wordpress
للكشف عن اخطاء الموقع Enable PHP Debugging

تفعيل مشاهدة الاخطاء على صفحة الموقع

https://www.rise.company/forum/images/imported/2017/06/72.png

افتح الملف wp-config.php ثم ستجد هذا السطر

define( ‘WP_DEBUG’, false );
اجعله True فقط وسيظهر الخطا ان وجد على صفحة الموقع الرئيسية

تفعيل مشاهدة الاخطاء على ملف منفصل

https://www.rise.company/forum/images/primus/bw/misc/logo.png

ضع هذا السطر اسفل السطر السابق

define( ‘WP_DEBUG_LOG’, true );
وستجد النتيجة فى ملف فى المسار /wp-content/debug.log

الاكواد كلها مجمعه

https://www.rise.company/forum/images/imported/2017/06/1.png?1444958493






// Turn debugging on






define('WP_DEBUG', true);













// Tell WordPress to log everything to /wp-content/debug.log






define('WP_DEBUG_LOG', true);













// Turn off the display of error messages on your site






define('WP_DEBUG_DISPLAY', false);













// hide errors from being displayed on-screen




@ini_set('display_errors', 0);

-------------------------------------------------------------------------------------------------

How to turn on WordPress debug mode using cpanel ( wp_debug )

https://www.youtube.com/watch?v=j6s3iaaYmFw

To check your wordpress error log do this you must turn on debugging in your wordpress config file.
Do this from a FTP Browser or hosting panel. Find a file called wp-config.php this will be in the base of your wordpress installation.
Look for this section near the button:
* Change this to true to enable the display of notices during development.


define('WP_DEBUG', false);

If you want wordpress to send debugging information to a file called debug.log
put this code also


define('WP_DEBUG_LOG', true);

the result will be in [root wordpress foler]/wp-content/debug.log

Log viewer plugin

https://www.rise.company/forum/images/imported/2017/06/1.png?rev=801608

https://wordpress.org/plugins/log-viewer/

To view the debug log from your admin panel you can installed the plugin log viewer (https://wordpress.org/plugins/log-viewer/).
Then you can see your log by going to tools > log viewer. But you still need to enable logging to use this plugin.
After you have set debugging to true and you have run the scenario that creates the problem, if the plugin states no file or the debug.log has not been created then there was no WordPress error to log.
If there are errors in this file, please send me a copy to debug.

php error log

If there are no errors in your debug.log then is best to then check your php error log.
You can find it in the root of your wordpress installation, it will be called error_log.