Before attempting to upgrade wordpress, always perform a backup of your databases and wordpress installation, just in case something goes wrong.
Currently (as of April 2006), the Gentoo wordpress packages are masked. If trying to emerge wordpress, the following warning is given:
These are the packages that would be merged, in order: Calculating dependencies | !!! All ebuilds that could satisfy "wordpress" have been masked. !!! One of the following masked packages is required to complete your request: - www-apps/wordpress-2.1.3 (masked by: package.mask, ~x86 keyword) # Stefan Cornelius <dercorny@gentoo.org> (3 Mar 2007) # Masking wordpress due to a long list of security bugs # e.g. check bug #168529 - www-apps/wordpress-2.0.10 (masked by: package.mask, ~x86 keyword) For more information, see MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.
In order to overcome this, you will need to overcome the “package.mask” masking of wordpress and to overcome the ”~x86 keyword” masking.
To overcome the “package.mask” masking, edit /etc/portage/package.unmask and add the following line:
www-apps/wordpress
To overcome the ”~x86 keyword” masking, edit /etc/portage/package.keywords and add the following line:
www-apps/wordpress ~x86
N.B. There is a good reason for Wordpress to be masked, there are numerous vulnerabilities as documented by the Gentoo community. Caveat Emptor, you have been warned.
To use webapp-config to complete the installation execute the following:
webapp-config -U -h <HOSTNAME> -d <DIRECTORY CONTAINING WORDPRESS> wordpress <WORDPRESS VERSION NUMBER
As a demonstration, I ran the following command to upgrade my wordpress installation:
webapp-config -U -h lorcancoyle.org -d blog wordpress 2.1.3
You will then be prompted to execute a command like:
CONFIG_PROTECT="/path/to/wordpress/installation//" etc-update
This will bring up an etc-update dialog and prompt you to decide which configuration files to use (the new ones or the old ones). N.B. the old wp-config.php file contains your database passwords, you will need these for your installation to work correctly so if you select the new version of this file remember to copy the username/password.
To complete the installation load the upgrade URL of your installation: e.g.
http://example.com/wordpress/wp-admin/upgrade.php
There are (much) more detailed instructions on the Wordpress Codex.