Install the VisualEditor 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 VisualEditor extension on MediaWiki, follow these steps:

  • Install git:

      $ sudo apt update
      $ sudo apt install git
  • Go to the MediaWiki extensions directory. Depending on your installation type, run the following commands:

    • Approach A (Bitnami installations using system packages):

        $ cd /opt/bitnami/mediawiki/extensions
    • Approach B (Self-contained Bitnami installations):

        $ cd /opt/bitnami/apps/mediawiki/htdocs/extensions
  • Download the VisualEditor repo. Change REL1_28 for major version branch (e.g. MediaWiki 1.26.1 should use REL1_26):

      $ git clone -b REL1_28 https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor.git
      $ cd VisualEditor
      $ git submodule update --init
  • Edit the LocalSettings.php file and add this code at the end of the file:

      wfLoadExtension( 'VisualEditor' );
      // OPTIONAL: Enable VisualEditor in other namespaces
      // By default, VE is only enabled in NS_MAIN
      //$wgVisualEditorNamespaces[] = NS_PROJECT;
      // Enable by default for everybody
      $wgDefaultUserOptions['visualeditor-enable'] = 1;
      // Don't allow users to disable it
      $wgHiddenPrefs[] = 'visualeditor-enable';
      // OPTIONAL: Enable VisualEditor's experimental code features
      //$wgVisualEditorEnableExperimentalCode = true;
  • Restart the Apache server:

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

NOTE: You will be able to use VisualEditor to create new Wiki Pages, but not to edit them. If you want to use VisualEditor to edit them, you will need to follow the official Parsoid installation guide.

Last modification December 21, 2022