Current version of spip_loader : 5.3.0
Use spip_loader to install SPIP automatically
- Check the php compatibility of your host by following the following table https://www.spip.net/fr_article6500.html
- Download the script
- Set this file via ftp in the directory where you want to install SPIP (generally at the root of your server).Caution: as the script is compressed, you should switch your FTP client to binary mode for this transfer
- Call the script from your browser
http://www.mysite.tld/spip_loader.php
- The script checks if your hosting meets the necessary requirements then indicates the SPIP version you are going to install or update (usually the latest version).
- Choose your version and start the automatic installation.
Leave the script online
Once SPIP installed, you can safely leave the script spip_loader.php (from version 2.1.0) on the server. Only the authorised and authenticated administrators will be able to access it. The benefit is to be able, in case of a problem, to update SPIP very easily.
Detailed explanations
From version 3.0.2 onwards, spip_loader detects its new versions and offers to update itself without the need for an FTP transfer.
- a drop-down list allows to choose the version to be installed
- if no SPIP is installed :
- the drop-down list selects the latest stable version
- if a SPIP is already installed :
- the drop-down list is positioned by default on the latest version of the same branch as the site (if it is still referenced).
- files that are obsolete after the update (i.e. that have been removed between the current site version and the installed version) are stored in a directory
fichiers_obsoletes_{date}
where date is replaced by the current date and time. This applies only to the directories:ecrire
,prive
,squelettes-dist
andplugins-dist
(and the old directoryextensions
). - corollary to the previous point, if plugins had been added to the plugins-dist/ directory (therefore not belonging to the zip provided by SPIP), they will also be moved to this directory of obsolete files, unless they contain a
.spip_loader_keep
file.
- It is possible to use a configuration file to manage the defines and keep them from one update to another with spip_loader_config.php
As of version v5.2.0, spip_loader.php is in compressed phar binary format, which also includes translations. If you need to use defines, you need to create a configuration file spip_loader_config.php
Use spip_loader to execute an update
To update SPIP, proceed the same way:
- Access the SPIP private area
- Upload the script to your server (if not already done)
- Call the script from your browser
http://www.mysite.tld/spip_loader.php
- Choose the version you want to install
- Launch the automatic installation process
Before calling the script you should be identified as a webmaster.
Customize the authors authorized to perform an update
By default, only the author n°1 can perform this update.
If you want to add other authors, you need to create a configuration file spip_loader_config.php (at the root) which will be included automatically. This way your settings are preserved when updating spip_loader.
Example of file spip_loader_config.php
:
<?php
define('_SPIP_LOADER_UPDATE_AUTEURS', '5:6:8');
Previously : Before version v3.0.2, it was necessary to edit the spip_loader.php file directly and modify the line in question.
What to do in case of failure?
spip_loader can fail to upload files. Generally it is caused by permissions issues on the server. In this case you will have to install SPIP:
- either by transferring manually the files via FTP
- or by using git (for advanced users)
Technical notes
- The minimum PHP version required to use this script is 5.5
- The minimum PHP version for SPIP can be higher: https://www.spip.net/fr_article6500.html
- The spip-loader sources are in the development area:
https://git.spip.net/spip-contrib-outils/spip_loader