deprecation - Overwrote index.php. When I restored it, I got lots of Notice level errors

I overwrote the index.php file in the main directory of wordpress.I was working on something else and uploaded an index.

I overwrote the index.php file in the main directory of wordpress.

I was working on something else and uploaded an index.php file from a different project. I didn't realize and no-one pointed it out to me for about a week.

I replaced it with the one on my hard drive and got lots of Notice and Deprecated errors.

I thought maybe my version was too old, so I checked wp-includes/versions.php and found the site was reporting $wp_version = '5.2.3';

I downloaded the zip file for that, extracted the index.php file and uploaded it. I still get those errors.

Below the errors, the site seems to load. The admin area, however, will not load because the displayed errors cause headers to be sent, triggering "headers already sent" errors.

When I look at the index.php file, it's hard to imagine that this simple file is actually the cause of the problem, but since that's that file I killed, it's my first suspect of where my trouble lies.

What are some troubleshooting steps I can take to correct this issue?

I overwrote the index.php file in the main directory of wordpress.

I was working on something else and uploaded an index.php file from a different project. I didn't realize and no-one pointed it out to me for about a week.

I replaced it with the one on my hard drive and got lots of Notice and Deprecated errors.

I thought maybe my version was too old, so I checked wp-includes/versions.php and found the site was reporting $wp_version = '5.2.3';

I downloaded the zip file for that, extracted the index.php file and uploaded it. I still get those errors.

Below the errors, the site seems to load. The admin area, however, will not load because the displayed errors cause headers to be sent, triggering "headers already sent" errors.

When I look at the index.php file, it's hard to imagine that this simple file is actually the cause of the problem, but since that's that file I killed, it's my first suspect of where my trouble lies.

What are some troubleshooting steps I can take to correct this issue?

Share Improve this question asked Oct 17, 2019 at 20:27 IJustMightBeAnIdiotIJustMightBeAnIdiot 192 bronze badges 3
  • I tried disabling PHP display_errors and it didn't help. I used phpinfo() to verify the setting was "off". It is, for local and master setting. – IJustMightBeAnIdiot Commented Oct 17, 2019 at 21:13
  • What are the errors/notices? And have you tried downloading a fresh copy of WP and installing it over the top to replace the files? That way you know they're the originals? You can do that using the reinstall button on the check updates page in WP Admin – Tom J Nowell Commented Oct 17, 2019 at 21:38
  • When you suppress error reporting the problem still exists, fills good and close your eyes to the reality. For the brand-new index.php content look here. – Max Yudin Commented Oct 18, 2019 at 9:30
Add a comment  | 

1 Answer 1

Reset to default 1

Someone else had tried to help my client. They had enabled debugging in /wp-config.php

define('WP_DEBUG', true);

When I turned off debugging, the site and admin loaded correctly.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745071038a4609546.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信