The website reminded me about a new version had been launched. So I clicked Update. I expected it to finish updating quickly. And it did, with an error of unable to write folder. Initially, I thought it should be the problem of ‘Group’. I added a new group, changed the permissions and assigned the files to the group. No use. Then, I changed the files to 777, yet it did not work, either.
I decided to update it manually. The following two methods are tested. The first method was to download and upload the latest version through SSH, which was too slow, not to mention the network. All these led to the second method of the following lines:
- wget http://wordpress.org/latest.zip
- unzip latest.zip
- rm –rf wordpress/wp-content /var/www/html/wp-admin /var/www/html/wp-includes
- mv wordpress/* /varwww/html/
- rm –rf wordpress
Remember, before the commands executed, the important files are backed up.
Later, I found that it was actually very simple.
chown -R apache:apache /*/*/wp-content