Manual WordPress update

WordPress can be updated in the site-admin. However, in some setups it does not work and has to be done manually. It goes like this:

1. Backup Database (get login-data out of wp-config.php) to a file “olsen.sql”

mysqldump -u olsen -p -h mysql5.vmk.zhdk.ch olsen >../../olsen.sql

2. Get and unpack latest wordpress. Be careful, the unpacking will create a directory “wordpress”. If you have already an existing installation in a folder with the same name, it will be overwritten.

wget wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz

3. Copy content and config to the new installation

cp -R eisdieler/wp-content/* wordpress/wp-content/
cp eisdieler/wp-config.php wordpress/

4. Rename the old installation, replace the old one by the new one by renaming it

cp -R eisdieler/wp-content/* wordpress/wp-content/
cp -R eisdieler/wp-config.php wordpress/

5. Set the permissions, so that the user and the webserver have the required access

chown -R olsen eisdieler
chgrp -R www-data eisdieler
chmod -R 775 eisdieler

6. Login to the site-admin. The database will be updated.

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.