- Newest
- Most votes
- Most comments
The error message you're encountering suggests that WordPress does not have the necessary permissions to overwrite core files during an update. Even though you've set the permissions to 664/644
for files and 775/755
for directories, the issue may indeed stem from ownership or special permissions required for core updates. Here's what you can do:
-
Check Ownership: The
bitnami:daemon
ownership is typical for Bitnami stacks, wherebitnami
is the user anddaemon
is the group. WordPress needs to be able to write to these files, which is typically allowed if the files are owned by the user under which the web server is running.For a Bitnami stack, you might want to ensure that the files you're attempting to update are owned by the
daemon
group. You can change the group ownership with:sudo chown -R bitnami:daemon /opt/bitnami/wordpress
And then ensure that the group has write permissions:
sudo find /opt/bitnami/wordpress -type d -exec chmod 775 {} \; sudo find /opt/bitnami/wordpress -type f -exec chmod 664 {} \;
-
WP-CLI: Since running
wp-cli
withsudo
didn't resolve the issue, it's likely not a straightforward permission problem. However, you can try to manually update WordPress core with WP-CLI to see if it gives more detailed output:sudo wp core update --path=/opt/bitnami/wordpress --allow-root
-
Check Security Plugins: If you have security plugins installed, they might be preventing the changes. Temporarily disable them and try updating again.
-
Filesystem Method: Ensure that the
FS_METHOD
in yourwp-config.php
is not set toftpext
which requires FTP credentials to update. For local filesystem method, it should not be defined or set asdirect
.define('FS_METHOD', 'direct');
-
Temporary Files: Ensure that WordPress can manage temporary files during the update. You might need to specify a temporary directory that WordPress can write to in
wp-config.php
:define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
Before adding this line, create the
temp
directory withinwp-content
and give it the correct permissions:mkdir /opt/bitnami/wordpress/wp-content/temp sudo chown bitnami:daemon /opt/bitnami/wordpress/wp-content/temp sudo chmod 775 /opt/bitnami/wordpress/wp-content/temp
-
Manual Update: If all else fails, you can always manually update WordPress by downloading the latest version and copying it over the existing files. This is a more hands-on approach and should be done with care to not overwrite customizations.
Remember to backup your site before making changes, so you can restore it if something goes wrong. Also, consider doing such updates during a low-traffic period to minimize the impact on your users.
Relevant content
- asked 5 years ago
- Accepted Answerasked 10 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago