Opened 4 years ago
Closed 4 years ago
#52420 closed defect (bug) (invalid)
core file "wp-load.php" getting wiped out
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | 5.6 |
Component: | Bootstrap/Load | Keywords: | |
Focuses: | Cc: |
Description
Hello,
We've discovered a strange bug with a WP instance. All of sudden the WP websites start throwing out the 500 Internal Server Error.
The local error log files contain the following records:
======================================================================================
Uncaught Error: Call to undefined function wp() in /home/username/public_html/wp-blog-header.php:16
======================================================================================
Looking at the WP core files, we can see that the "wp-load.php" file is completely empty:
=============================
0 wp-load.php
4.0K cgi-bin
4.0K index.php
4.0K wp-blog-header.php
4.0K wp-comments-post.php
4.0K wp-config.php
4.0K wp-config-sample.php
4.0K wp-cron.php
4.0K wp-links-opml.php
4.0K xmlrpc.php
8.0K readme.html
8.0K wp-activate.php
8.0K wp-trackback.php
=============================
A temporary solution that we found consists of uploading the "wp-load.php" file from a fresh WP installation archive and assigning the immutable bit on the file using "chattr"
We don't know what process or change causes the core file code wiped out.
Can you please look into it and let us know if it's a global problem with the WP instance or it's a local problem?
Hi @whbtechs and thanks for the report!
The support forums have similar reports. One of the topics includes various recommendations to change the wp-load.php file permissions, deactivate plugins and scan for malware.
https://wordpress.org/support/topic/wp-load-file-is-becoming-blank/
This discussion likely belongs in support instead of Trac, so I'll mark the ticket for possible closure.