How do I fix open stream error in WordPress?
When I try to open WordPress, I get an error like the following:
Warning: copy(/vhost/path/wp-admin/includes/update-core.php): failed to open stream: Permission denied in /path/to/some/file on line 300
The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
Installation Failed
1 Reply
The error you are seeing indicates that WordPress does not have permission to access a file (or files) that is needed in order to update. This typically means that the file permissions need to be adjusted so that WordPress can access the file(s). The exact permission adjustment will depend on what exactly is wrong, but you can investigate using a command like the following, where /path/to/file
is the full path to the file that you are checking permissions for:
ls -l /path/to/file
Depending on the specific inconsistency, the permissions set you assign will be different, but you can use the chmod
command to apply the change. You can check out our guide on Installing WordPress, as well as this article which discusses this error, as well as how to fix it, for guidance on exactly how to proceed.