我有一个正在运行的WordPress网站一段时间了。
最近,我注意到某人或某事正在请求www.example.com/wp-admin/setup-config.php?step=0
. 导致我的错误日志中出现这些条目的原因是什么?
PHP Warning: Use of undefined constant DB_USER - assumed \'DB_USER\' (this will throw an Error in a future version of PHP) in /var/www/html/wp-includes/load.php on line 404, referer: example.com/wp-admin/setup-config.php?step=0│
undefined constant DB_PASSWORD - assumed \'DB_PASSWORD\' (this will throw an Error in a future version of PHP) in /var/www/html/wp-includes/load.php on line 404, referer: example.com-admin/setup-config.php?step=0
undefined constant DB_NAME - assumed \'DB_NAME\' (this will throw an Error in a future version of PHP) in /var/www/html/wp-includes/load.php on line 404, referer: example.com/wp-admin/setup-config.php?step=0
undefined constant DB_HOST - assumed \'DB_HOST\' (this will throw an Error in a future version of PHP) in /var/www/html/wp-includes/load.php on line 404, referer: example.com/wp-admin/setup-config.php?step=0
当我访问时
www.example.com/wp-admin/setup-config.php?step=0
我看到上面的错误被添加到了错误中。日志和我的浏览器中预期的正常消息:
文件wp config。php已经存在。如果需要重置此文件中的任何配置项,请先将其删除。您现在可以尝试安装。
网站运行正常。当然,我不想运行配置脚本。和DB_USER
, DB_PASSWORD
, DB_NAME
和DB_HOST
定义为我的wp-config.php
文件
A 如何防止对安装配置进行不必要的访问。php文件?B 如果有人请求设置配置。php。如何防止错误。日志是否凌乱?
我不想禁用日志记录警告