b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Installation / Upgrade
  3. Configuration files
  4. Files related to upgrade
  5. upgrade_policy.conf

upgrade_policy.conf

This is for more advanced users.

In the /conf folder there is a file called upgrade_policy_sample.conf. It is recommended that you copy and rename this file to upgrade_policy.conf.

This will allow b2evolution to perform an Auto Upgrade:

  • without leaving unwanted files on your server;
  • without overwriting file you don’t want to overwrite (e-g: favicon.ico)

In this file you can give all kinds of instructions to b2evolution as to how to handle files during upgrade. Look at the comments in the file for more information.

Commands

The default behaviour is that b2evolution will use all the files of the downloaded new version and overwrite your old files with those new files. You can use several commands to force b2evolution to ignore some files or put them in different places.

Here are the possible commands you can use in the file:

Commands that control how the newly downloaded files are processed

  • ignore : will ignore a file or a directory from the new version (this file or directory will not be copied to your site). This also means that if you have an old or customized version of this file on your site, it will stay there, untouched.
  • softmove : will move a file from the new version to another location than the default location on your site. "soft" means, it will not overwrite any destination file that is already in place.
  • forcemove : will move a file from the new version to another location than the default location on your site. "force" means, it will overwrite any destination file that is already in place.

Note: with softmove and forcemove, the file will be moved right after download, from the download location to the desired location without ever being copied to its default location on your site.

Commands that apply to all files present on your site, after DB upgrade

  • remove : will remove any file or directory of the specified name from your site at the end of the upgrade. Use this for the install folder for example.

Default contents

These are the default contents of the file:


; This file allows to configure the automatic upgrade process
;
; !!! DO NOT USE THIS FILE AS IS !!!
;
; Please check every line to make sure it fits the needs of your own website.
;
; supported keywords:
; ignore (file or directory path relative to source basepath)
; softmove (file path relative to source basepath) (file path relative to destination basepath)
; forcemove (file path relative to source basepath) (file path relative to destination basepath)
; remove (file or directory path relative to destination basepath)
;
; More info: http://b2evolution.net/man/upgrade_policy-conf

; Don't recreate files that are typically used only as starting points
; (and should probably be removed from or replaced on your site once it's in production):
ignore default.php
ignore favicon.ico
ignore license.txt

; Don't put back trackback feature if it has been removed (it attracts too much spam):
ignore htsrv/trackback.php

; Don't create new media files for demo users: 
ignore media/blogs
ignore media/users

; Ignore basic skin:
ignore skins/basic

; Rename sample .htaccess files to activate them:
; the following line is no longer recommended because the upgrader needs sample.htacess to check if it has changed: 
; softmove sample.htaccess .htaccess
forcemove cache/sample.htaccess cache/.htaccess
forcemove conf/sample.htaccess conf/.htaccess
forcemove cron/sample.htaccess cron/.htaccess
forcemove inc/sample.htaccess inc/.htaccess
forcemove locales/sample.htaccess locales/.htaccess
forcemove media/sample.htaccess media/.htaccess
forcemove plugins/sample.htaccess plugins/.htaccess
forcemove rsc/sample.htaccess rsc/.htaccess
forcemove skins/sample.htaccess skins/.htaccess
forcemove skins_email/sample.htaccess skins_email/.htaccess
forcemove skins_site/sample.htaccess skins_site/.htaccess

; Remove the install folder which is no longer needed after install:
remove install

; Remove folders and files that shouldn't be on a production server anyways:
remove _tests
remove _transifex
remove gettext
remove Templates
remove tests
remove locales/messages.pot
remove bower.json
remove Gruntfile.js
remove package.json

; Remove obsolete features:
remove cron/getmail.php
remove cron/mms.php

Created by fplanque • Last edit by fplanque on 2019-06-18 14:41 • •

No feedback yet

On this page

  • Commands
  • Commands that control how the newly downloaded files are processed
  • Commands that apply to all files present on your site, after DB upgrade
  • Default contents

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
    • New Installation
    • Upgrade
    • Configuration files
      • _basic_config.php
      • _advanced.php
      • Other /conf files
      • Files related to upgrade
        • _maintenance.html
        • upgrade_policy.conf
        • backup_ignore.conf
      • System config files
    • Advanced Setup
    • Migrating from Another System
    • Moving your b2evolution Site
    • FAQ & Troubleshooting (Installation / Upgrade)
    • Assumed User Skills
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Multi-blog engine

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque