generalmediawiki

Install the ParserFunctions extension

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

If you want to install the ParserFunctions extension on MediaWiki, please follow these steps depending on your installation type.

Approach A: Bitnami installations using system packages

  • Download the latest extension from https://www.mediawiki.org/wiki/Extension:ParserFunctions.

  • Uncompress the downloaded file in the Mediawiki extensions directory. The command below should create the ParserFunctions directory in the Mediawiki extensions directory:

    $ tar -xzf ParserFunctions-*.tar.gz -C /opt/bitnami/mediawiki/extensions
    
  • Edit the /opt/bitnami/mediawiki/LocalSettings.php file and add this code at the end of the file:

    require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
    
  • If you want to use the integrated string functionality, add just after that line:

    $wgPFEnableStringFunctions = true;
    
  • Restart the Apache server:

    $ sudo /opt/bitnami/ctlscript.sh restart apache
    

Approach B: Self-contained Bitnami installations

  • Download the latest extension from https://www.mediawiki.org/wiki/Extension:ParserFunctions.

  • Uncompress the downloaded file in the Mediawiki extensions directory. The command below should create the ParserFunctions directory in the Mediawiki extensions directory:

    $ tar -xzf ParserFunctions-*.tar.gz -C /opt/bitnami/apps/mediawiki/htdocs/extensions
    
  • Edit the /opt/bitnami/apps/mediawiki/htdocs/LocalSettings.php file and add this code at the end of the file:

    require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
    
  • If you want to use the integrated string functionality, add just after that line:

    $wgPFEnableStringFunctions = true;
    
  • Restart the Apache server:

    $ sudo /opt/bitnami/ctlscript.sh restart apache
    
Last modification June 30, 2020