Upgrade MODx Evolution from command line

on 01-Nov-2009 | Comments ( 1 ) Tags: Evolution

The main reason for using a command line is that it really really fast. You can upgrade your modx install in less then 5 minutes. Using (s)ftp seems to take forever. This tutorial requires basic understanding of linux command line and some modx experience.

Important: this tutorial is optimized for upgrading a non-root modx install. If your modx install sits directly in the www folder you will have to change the paths. Don't use this on a live install unless you've done it before and you know how to restore from your backup.

First you will need to ssh to your server.

ssh your-username@your-server.com

Enter your password and navigate to where your modx install is via cd command.

Note: If you do not have ssh or command line access then this tutorial is not for you :(

Download the newest modx

wget path-to-the-latest-modx.zip

Eg: http://modxcms.com/download/ga/MODx-1.0.1.zip

Note: In order to get the download path you have to navigate to the latest step in the modx download process.

Extract the archive

unzip MODx-1.0.1.zip

Backup your files using the zip command

zip -r ~/your-modx-folder.bk.`date "+%Y.%m.%d.%H.%M.%S"`.zip your-modx-folder

VERY IMPORTANT: ~ tells the system that the new backup file will be created in your home folder, outside the web folder (public_html or www). Do not keep your archived backups in the web folder as someone might try to guess the file name, download it and use the information stored in the configuration files.

Backup your database

Go to Tools/Backup. Click Generate DROP TABLE statements and select all the table rows by checking the first checkbox. Press Click Here to... link to download a backup of your database.

Updating the files

cp -r modx-1.0.1/* your-modx-folder

This is the command that does all the hard work. If everything worked you should see a new install folder in your modx directory.

Now point your browser to your-domain/install to start upgrading.

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
 
elastic
Posts: 1
Comment
mysqldump
Reply #1 on : Sat December 26, 2009, 11:55:45
Hi Cipa!Excellent site!
You can use mysqldump to create database backup.
mysqldump --opt -Q -u dbusername -p databasename > backupname.sql

Quick modx Evolution Tags

  • cached [[snippet]] or uncached [!snippet!]
  • {{chunk}}
  • [+placeholder+]
  • [*resourceField/TV*]
  • [^timing^]
  • [~link~]

Quick modx Revolution Tags

  • [[snippet]]
  • [[$chunk]]
  • [[+placeholder]]
  • [[*resourceField/TV]]
  • [[~link]]
  • [^timing^]
  • [[++systemSetting]]
  • [[%languageStringKey]]
  • all tags can be called un-cached like: [[! snippet]]

Timing Tags (Evo and Revo)

  • [^qt^] - Query time
  • [^q^] - Query count
  • [^p^] - Parse time
  • [^t^] - Total time
  • [^s^] - Source
© modxRULES! 2009-2014