Hello everyone,
last day I had to update Drupal 7.10 to the most recent at the moment (7.12), I never did something like that so I was like “here we go, 1 work day that will go burned!
“, but thanks to the Drupal community I was able to update the installation.
Since isn’t very easy at first (reading UPGRADE.txt was not helpful unfortunately), therefore here a quick list of the steps:
- Put your site into maintenance mode or close accesses from the outside.
- First of all, backup your installation folder (usually a
rsync -av startfolder destinationfolder, or acp -a startfolder destinationfolderwill do the job just fine) - Then you have to backup your database (you can do it all in one step using
screen, but I bet that if you are reading this and you are experienced you already know that), depending if you are running MySQL or PostgreSQLthe instructions changes, but I think could be sum up as follows:- MySQL:
mysqldump -uUser -pPassword -hHost dbname > dumpname.sql - PostgreSQL:
pg_dump databasename > dumpname.sql
If you use PostgreSQL you need to remember that the operations have to be done with the correct user. Refer to the documentation for further details.
- MySQL:
- After you have done the backups, reach your site root folder and create a folder to hold the new Drupal version, something like
mkdir upgrade, then enter inside it withcd upgrade. - Download the archive with
wget http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz. - Open the archive with
tar -xzvpf drupal-7.12.tar.gz. - Then enter the newly created directory like we did before,
cd drupal-7.12. - At this point we have all that we need, this step is the actual upgrade, we have to move some files in the root directory, assuming you followed this steps, the command you need is the following:
rsync -av CHANGELOG.txt COPYRIGHT.txt cron.php includes index.php INSTALL.mysql.txt INSTALL.pgsql.txt install.php INSTALL.txt LICENSE.txt MAINTAINERS.txt misc modules profiles scripts themes update.php UPGRADE.txt xmlrpc.php ../../ - After you have done that, should be an instant action, open your browser and go to your website URL and add a
/update.phpat the end, you should havehttp://www.myawesomedrupalsite.com/update.php. - Follow the instruction on-screen to complete the update process on the database, don’t change anything from the dropdowns.
- Once the update is complete you may remove the directory we created to download and extract drupal.
Is not very short but is all you need to do.
Enjoy!