VisualEditor/Installation on a shared host

VisualEditor requires a Parsoid service, (using the Parsoid/Developer Setup here). Parsoid requires Node.js running in the background at all times. Most shared-hosting companies don't provide this. If you cannot move your wiki to a dedicated hosting solution such as a VPS, then a workaround is to install Parsoid on a cloud platform which supports Node.js, such as Heroku.com. Be aware that this is not an official hack.


 * 1) Install Extension:VisualEditor on your wiki as per usual. (You can download it from here, the best will be the latest stable relase).
 * 2) Sign up with Heroku.com.
 * 3) In the a language choice section select node.js
 * 4) Install the Heroku Command Line utility as well as any dependencies (i.e node.js and npm.)
 * 5) The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:    Your name:   and your email adress
 * 6) After successful installation, open "Start Command Prompt with Ruby" (You have just installed it) and create new folder (You can do it manual by typing this command "Mkdir C:\folder1").
 * 7) Next, change path to your created folder (folder1). (You can do it by typing this command "cd C:\folder1").
 * 8) Download Parsoid using this command:
 * 9) After successfully downloading, go to parsoid location on your disk (For example here "C:\folder\parsoid").
 * 10) Open , and change   according to your wiki:
 * 11) The first parameter is the "prefix". The "prefix" is the name given to this wiki configuration in the deprecated Parsoid v1 API - Leave this option as default 'localhost'.
 * 12) The second parameter is "domain". The "domain" is used for communication with Visual Editor and RESTBase - Leave this optoin as default 'localhost'.
 * 13) The third parameter is "uri". The "uri" is the URL to your API (normally this is in the root-folder and called api.php) - Change this option according your wiki (For example http://wiki.mysite.com/api.php or http://mysite.com/w/api.php or something like that).
 * 14) "Proxy" parameter leave as default.
 * 15) If you use SSL on your wiki with a self-signed certificate you should uncomment   in Line 102. You should still use HTTP in the URL above instead of HTTP! Note that, in at-least one instance for a Wiki on SSL having redirect rules for HTTP to HTTPS, using   gave an: "Error loading data from server: 500:docserver-http:HTTP 500." error. This was fixed on using   or on removing the redirect rule.
 * 16) Once you applied the changes save the file as.
 * 17) Don't forget to change the file name  to   in this folder.


 * 1) Now you also need to change the file package.json and add this to the end of the file: (Your package.json file should look like this )
 * 2) Finally the last change is in the file  (In root parsoid folder). Here you need to remove the line  . (Line 11)
 * 3) Now change to another folder (folder2) in your console. (You can do it manual by typing this command "Mkdir C:\folder2 and cd C:\folder2").
 * 4) Now, login to your heroku account by typing
 * 5) Type   to create a new app. This will also create a git remote called heroku.
 * 6) Then open your app on Heroku.
 * 7) In "Settings" edit the "Config Variables" and add the following parameter:
 * 8) Key:  Value:
 * 9) And add the "Buildpack" "nodejs" ("heroku/nodejs" will appear as buildpack URL).
 * 10) Now copy your files from the parsoid folder in folder 1 to folder2. Note that you have to copy the files inside the parsoid folder into folder2 and not the parsoid folder itself.
 * 11) Then add all files to your git repository:   and after this
 * 12) Commit the changes:
 * 13) You'll see git editor.You can get out of it by typing the command  . After this u show message "Aborting commit due to empty commit message". Don't worry this is normal.
 * 14) Next, add your Heroku app as a Git remote
 * 15) Commit by typiing
 * 16) Upload the files to Heroku:
 * 17) Now you should get a positive response.
 * 18) Before you run your app set Heroku to run it with one dyno:
 * 19) To test your installation open your app: URL is http://APPNAME.herokuapp.com
 * 20) You should see a HTML-Page titled   which shows that Parsoid is working.
 * 21) Now it's time to change your LocalSettings.php
 * 22)  - Enable VisualEditor by default for everybody
 * 1)  - Enable VisualEditor by default for everybody

Example Parsoid in Heroku
See https://parsoid-on-heroku.herokuapp.com

External resources

 * Getting Started with Node.js over Heroku Manual