Update WordPress

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:

  1. wget http://wordpress.org/latest.zip
  2. unzip latest.zip
  3. rm –rf wordpress/wp-content /var/www/html/wp-admin /var/www/html/wp-includes
  4. mv wordpress/* /varwww/html/
  5. 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

Leave a Reply

Your email address will not be published. Required fields are marked *