我认为瑞克的回答是一个很好的开始。您是如何迁移数据库的?此外,如果可以在生产中使用,请将以下内容添加到wp-config.php, 就在包含的行之前wp-settings.php:
80 define(\'WP_DEBUG\', true);
81 define(\'WP_DEBUG_LOG\', WP_DEBUG);
82 define(\'WP_DEBUG_DISPLAY\', WP_DEBUG);
83
84 /* That\'s all, stop editing! Happy blogging. */
85
86 /** Absolute path to the WordPress directory. */
87 if ( !defined(\'ABSPATH\') )
88 define(\'ABSPATH\', dirname(__FILE__) . \'/\');
89
90 /** Sets up WordPress vars and included files. */
91 require_once(ABSPATH . \'wp-settings.php\');
此处的相关行是
WP_DEBUG* 线条-这将做几件事:
define(\'WP_DEBUG\', true); - 启用从WordPress进行调试define(\'WP_DEBUG_LOG\', WP_DEBUG); - 根据的值启用/禁用日志记录调试消息WP_DEBUGdefine(\'WP_DEBUG_DISPLAY, WP\\U调试);- enables/disables displaying debug messages on the site - you may want to change the value fromWP\\U调试to错误if you\'re worried about potential visitors seeing debug information, i.e.define(\'WP\\u DEBUG\\u DISPLAY\',false)`
特别有用的第二行可能是:
WP_DEBUG_LOG, 设置为时
true, 将PHP错误记录到
wp-content/debug.log. 打开
WP_DEBUG 和
WP_DEBUG_LOG, 访问您的管理区域,然后检查服务器
wp-content/debug.log - 您现在应该可以看到WordPress记录的任何相关错误或警告。