debug.log is not created

时间:2020-03-12 作者:ahmet kaya

日志只在管理面板加载时显示,页面加载后将隐藏,因此我无法显示日志。我还想调试。日志,但wp内容中没有该文件。

 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define( \'WP_DEBUG\', true );
define( \'WP_DEBUG_LOG\', true );
define( ‘WP_DEBUG_DISPLAY’, true );
define( ‘SCRIPT_DEBUG’, true );

/* That\'s all, stop editing! Happy publishing. */
我给了777对wp内容的许可,但它不起作用。

编辑:

我刚才找到了error\\u日志文件。它包含以下行:

[07-Mar-2020 21:14:20 UTC] PHP Warning:  Error while sending QUERY packet. PID=1649106 in /home/deniztas/migrate666.deniz-tasarim.site/wp-includes/wp-db.php on line 2030
[07-Mar-2020 21:14:48 UTC] PHP Warning:  Error while sending QUERY packet. PID=1649106 in /home/deniztas/migrate666.deniz-tasarim.site/wp-includes/wp-db.php on line 2030
[12-Mar-2020 11:59:49 UTC] PHP Notice:  Undefined index: mytheme_meta_box_nonce in /home/deniztas/migrate666.deniz-tasarim.site/wp-content/themes/html5blank-stable/functions.php on line 330
[12-Mar-2020 11:59:49 UTC] PHP Notice:  Undefined index: mytheme_meta_box_nonce in /home/deniztas/migrate666.deniz-tasarim.site/wp-content/themes/html5blank-stable/functions.php on line 330
[12-Mar-2020 11:59:49 UTC] PHP Notice:  Undefined index: mytheme_meta_box_nonce in /home/deniztas/migrate666.deniz-tasarim.site/wp-content/themes/html5blank-stable/functions.php on line 330
[12-Mar-2020 11:59:49 UTC] PHP Notice:  Undefined index: mytheme_meta_box_nonce in /home/deniztas/migrate666.deniz-tasarim.site/wp-content/themes/html5blank-stable/functions.php on line 330
[12-Mar-2020 15:36:51 Europe/Minsk] PHP Warning:  Use of undefined constant ‘WP_DEBUG_DISPLAY’ - assumed \'‘WP_DEBUG_DISPLAY’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 83
[12-Mar-2020 15:36:51 Europe/Minsk] PHP Warning:  Use of undefined constant ‘SCRIPT_DEBUG’ - assumed \'‘SCRIPT_DEBUG’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 84
[12-Mar-2020 15:37:51 Europe/Minsk] PHP Warning:  Use of undefined constant ‘WP_DEBUG_DISPLAY’ - assumed \'‘WP_DEBUG_DISPLAY’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 83
[12-Mar-2020 15:37:51 Europe/Minsk] PHP Warning:  Use of undefined constant ‘SCRIPT_DEBUG’ - assumed \'‘SCRIPT_DEBUG’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 84
[12-Mar-2020 15:37:59 Europe/Minsk] PHP Warning:  Use of undefined constant ‘WP_DEBUG_DISPLAY’ - assumed \'‘WP_DEBUG_DISPLAY’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 83
[12-Mar-2020 15:37:59 Europe/Minsk] PHP Warning:  Use of undefined constant ‘SCRIPT_DEBUG’ - assumed \'‘SCRIPT_DEBUG’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 84
[12-Mar-2020 15:39:51 Europe/Minsk] PHP Warning:  Use of undefined constant ‘WP_DEBUG_DISPLAY’ - assumed \'‘WP_DEBUG_DISPLAY’\' (this will throw an Error in a future version of PHP) in /home/deniztas/migrate666.deniz-tasarim.site/wp-config.php on line 83

1 个回复
最合适的回答,由SO网友:sleepingpanda 整理而成

更改第3行和第4行的引号并尝试一下。

 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
 define( \'WP_DEBUG\', true );
 define( \'WP_DEBUG_LOG\', true );
 define( \'WP_DEBUG_DISPLAY\', true );
 define( \'SCRIPT_DEBUG\', true );

相关推荐

WP管理员缺少图标、大量的JavaScript错误,但仅当SCRIPT_DEBUG为FALSE时

我可以访问一台Linux/Apache服务器,在那里我试图部署WordPress。为了避免这个错误,我用默认的2017主题和所有禁用的插件对其进行了测试。当我以管理员身份登录到任何wp admin页面时,左侧导航中的大多数图标都会丢失,选中的复选框没有任何复选框(例如),浏览器控制台会充满JavaScript错误。例如,在仪表板页面上,没有任何图标可见,错误控制台的内容如下:Uncaught TypeError: a.widget is not a function at load-scripts