Here are short instructions for advanced Linux users to update Joomla! sites on Ubuntu Linux servers. Little Joomla! experience is required, the instructions are written from the Linux sys-admin reader perspective. The instructions assume full control over the server, though the instructions might also work on the shared hosting. These instructions also consider minor security updates only, not major updates like Joomla! 1.5 -> 1.6. For further instructions, please refer to Joomla! update manual. See also Joomla! update and migration forum. It is useful to subscribe to Joomla! security announcements RSS as Joomla!, being unsafe PHP software by its nature, requires security updates very often. Script kiddies can take down your site very fast unless you can keep up with the updates.
1. Work as the site user
The site can be installed locally (under /home) or globally (under /var/www). If the site is installed globally you might need to set your effective user. You should perform the command as the same user who owns the site PHP files. You should not be using root use as the owner of the site files. If you run Joomla! site through Apache, the effective user is www-data. Use sudo command to switch to this user. Use ls -l command to figure out which user you are.
sudo -i -u www-data
2. Back up code files
Use tar command to pack the existing folder structure in the case the update will destroy critical files.
cd /var/www/yoursite
tar -cjf yoursite.tar.bz2 *
3. Back up database
Note that you can see the database password in configuration.php file if you do not remember it.
mysqldump -umysql_user_name-p mysql_database_name > mysql_database_name.sql
4. Check Joomla! version
Login as administrator. The login URL is the site URL + /administrator
Choose Help -> System info from the menu.
You’ll see Joomla! version line.
5. Download version specific Joomla! update pack
Each minor version requires its own update. You can have update packages between each version like 1.5.18 -> 1.5.19, or update packs which leap versions like 1.5.18 -> 1.5.20. Go to Joomla! package listing. Pick-up the package which will update your current Joomla! version to the latest version. Download the patch file to the server.
wget http://joomlacode.org/gf/download/frsrelease/12611/53380/Joomla_1.5.18_to_1.5.20-Stable-Patch_Package.tar.gz
Extract it
tar -xvzf Joomla_1.5.18_to_1.5.20-Stable-Patch_Package.tar.gz
This will replace the changed Joomla! files with newer versions.
6. Check the update has been correctly applied
Visit Help -> System info again. See that the version number has been updated.
Check that all pages on your site are working.
Subscribe to RSS feed Follow me on Twitter
Follow me on Facebook Follow me Google+