Fix No such file or directory in [xxx]\wp-settings.php on line 21 error in WordPress

Have you recieve a “No such file or directory in C:\xampp\htdocs\wordpresssite\wp-settings.php on line 21” while installing or updating a WordPress site?

It also happened to me a while ago. And I was able to fix it.

The warning looks like below:

Warning: require(/xxx/public_html/wp-includes/load.php) [function.require]: failed to open stream: No such file or directory in /home/lastminu/public_html/wp-settings.php on line 21

Fatal error: require() [function.require]: Failed opening required ‘/xxx/public_html/wp-includes/load.php’ (include_path=’.:zzzz/library’) in /xxx/public_html/wp-settings.php on line 21

Solution

To solve this problem, you may unzip the zip file that you get from WordPress.org. If possible download it again and install it or replace the file that you currently have. Make sure to backup the themes and upload folders or any files that you made some changes.

*Some links may contain affiliate links. I may get small commission from your purchases to fund this website and to avoid annoying ads.