http://www.spip.net/en_article3472.html
Version 1.9 introduces a new way of organising SPIP’s files. If you update an existing site that uses SPIP 1.8 or earlier version, you will need to take some precautions and make sure to remove all the obsolete files.
If you are in a hurry, the usual method of update (i.e. just upload the new files on top of the older version), together with the removal of all the files ending in .php3 (except your personalisation files) should work.
This article describe a step by step method that should guarantee a « clean » upgrade to SPIP 1.9.
Upgrade steps
Before doing any important operation on your site, you should take the precaution of making a backup of the database.
Move all the files and folders of the old version to a subdirectory. Do not delete anything yet!
Install the SPIP 1.9 files in your root directory (remember to check the access rights on the folders CACHE/ and ecrire/data/).
Copy your template directory from the old version backup to the root directory (and, if necessary, rename it « squelettes »).
Transfer the directory IMG/ (and all the sub-folders) from the old version backup to the root directory (it contains all the logos, images and documents used on your site). You can remove the following sub-directories:
icones_barre/,
icones/ if it only contains -dist files [1],
cache…×…/ which contains the cache of images calculated by the server (reduced versions of images/logos, mathematical formulas, etc.); SPIP will be able to recreate these.
Transfer (if they exist) the personalisation files mes_fonctions.php3 (to your directory squelettes/) and mes_options.php3 (to the directory ecrire/), renaming them mes_fonctions.php and mes_options.php (i.e. remove the « 3 » at the end).
Login to the private area of the site and start the update of the site (if you have forgotten the connexion parameters of your MySQL database, you can find them by looking in the file ecrire/inc_connect.php3 of the backup of the old version).
We’ll never say it too often: do not try to import a « dump » backup created by a previous version of SPIP!.
Test thoroughly!
Updating your templates
With SPIP 1.9 , the template system is no longer based on a pair of files .php3/.html and now requires only the html file [2]: the PHP file can be removed. For example: remove the file article.php3 and keep the file article.html.
Language files can now be placed in a subdirectory lang/ of the template directory squelettes/.
Forms can be personalised by placing them directly in your squelettes/ directory (instead of in the formulaires/ directory in the root).
Personalised document icons should now be placed in IMG/icones/.
The template’s code should also be cleaned. This is not absolutely necessary — your old templates will work without it, but this will make your code « cleaner »:
Replace all the tags #DOSSIER_SQUELETTE/filename by #CHEMIN{filename},
The cache time, which used to be specified by the line $delais = 24 * 3600; in the discarded PHP file, is now specified by a tag #CACHE{24*3600} placed in each template.
HTTP headers can be declared by the tag: #HTTP_HEADER{Content-Type: text/css}. Note that if you were using the hack $flag_preserver=true; for some of your templates, its functionality (not displaying the administration buttons) can be reproduced by adding in the template: #HTTP_HEADER{Content-Type: text/html}
The inclusion syntax can be simplified, you do not need to specify the file « page.php », only the name of the template to be included is required: <INCLURE{fond=my_template}{criterion1}{criterion2}{…}>.
Managing URLs
Now that the php3 files have been removed, the urls of the pages have changed in SPIP 1.9, but you will probably want to keep the old URL scheme in place so that your visitors (and search engines) that referred to them can still find your site.
A htaccess file is provided with the standard distribution so that you can ensure a smooth transition to the new URLs of your site. You need only to rename the file htaccess.txt to .htaccess to activate it. On some sites, you will have to edit the file and enable the line with RewriteBase / (some FTP clients will not display this hidden file and you will have to specify its direct path to open it).
Conversion to utf-8
You can complete your migration by converting your site to the universal utf-8 character set. This is done from the « language management » configuration panel. This operation begins by making an automatic backup of your database in its original character set.
When you are sure that your site works well with this new version, do not forget to delete the backup subdirectory which you made at the beginning. If you have followed all the steps outlined above, it should only contain the files of the old version of SPIP. To be safe, before deleting it you may want to create an archive copy and keep it on your local computer — in case you forgot to copy something.
[1] In other words, if there are any files without -dist in their name you need to keep these.
[2] All templates are now called by the one page.php file.