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.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?

Topic deprecation errors Wordpress

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.