7

After updating a Wordpress, or merely doing something minor like attempting to deactivate a plugin, the site might get occasionally get stuck in a non-functional state where it merely outputs an error message like the following:

Fatal error: Call to undefined function nocache_headers() in /wp-admin/admin.php

What might be the cause for this happening?

1 Answer 1

7

There were wp files in the web root which had file size of 0 bytes.

Uploading proper copies from the zip file resolved the problem.

The same cause of the problem has occurred to me quite a few times in the past, but I had forgotten it.

5
  • 1
    please describe more about this wp file that i cant found that in zip file Jan 21, 2013 at 9:03
  • 1
    They were just wp-* files found in the web root.
    – Steve
    Jan 22, 2013 at 4:22
  • Fatal error: Call to undefined function is_multisite() in /home/baseline/public_html/wp-includes/default-constants.php on line 20 Jan 22, 2013 at 5:06
  • Some (buggy) plugins might fail when attempting to update wp-config.php, causing it to become an empty file. In my case the plugin gave a completely unrelated error, making it far from obvious to realize it had destroyed the config file.
    – sampi
    Sep 8, 2020 at 23:27
  • you saved my day; the file wp-load.php was blank. Feb 7, 2021 at 20:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.