azuremediawiki

Install the VisualEditor extension

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:

      $ cd /opt/bitnami/mediawiki/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 February 9, 2023