There are several well-known javascript frameworks such as ReactJS, ExpressJS, NodeJS, and so on. Which one is your choice? Well, there is one more type of Javascript that you can choose from, namely PhantomJS. PhantomJS is a type of web browser without a GUI display. How come? Then what is PhantomJS? What's the difference with other javascript? How do I install PhantomJS on Hosting? Instead of being confused, try reading the following guide.

What is PhantomJS

PhantomJS is a headless WebKit scriptable with JavaScript API. Quoted from Wikipedia , PhantomJS actually functions to automate interactions between website pages, create website screenshots with thumbnail previews using SVG and Canvas, and is useful for network monitoring. According to , PhantomJS has high speed and supports various web standards such as DOM handling, CSS selector, JSON, Canvas, and SVG. Since its establishment on January 23, 2011, PhantomJS is the optimal solution for headless website testing with several frameworks such as Jasmine, QUnit, Mocha, Capybara, WebDriver, and so on.

What's the difference with other Javascript?

Quoted from , PhantomJS is different from other javascript frameworks. PhantomJS is a web browser without a GUI display. PhantomJS only functions for website automation, for example in terms of interaction between pages, SVG preview, website testing and network monitoring only. In contrast to other javascript frameworks that function to build a website.

How to Install PhantomJS on Hosting?

Preparation phase

There are several things you need to prepare in advance.
First , you must know how to access the server via SSH . When installing, everything is done via SSH via the console. To know how to access the server via SSH, please read How to Access SSH via Terminal or PuTTy . Or for those of you who don't know what SSH is, please read What is SSH Server .
Second , because the installation process uses a lot of Linux commands, make sure you are familiar with various Linux commands . For those who don't know, please read 10 Linux Commands You Need to Know .
After you have passed the preparation stage, please do the install method of PhantomJS below

How to Install PhantomJS on Hosting

As for how to install PhantomJS on Hosting, namely,

1. SSH access on Hosting

Now please access the server via SSH using a terminal or PuTTy. If you are using Windows, feel free to use PuTTy. If you are using Linux or Mac, feel free to use the Terminal. To find out how, please read How to Access Server via SSH . Please write the following command,

ssh username @ controlpanelURL –p 64000

Keep in mind that SSH can only be done at a minimum of Super Hosting Packages

2. Download PhantomJS

After entering the hosting server, please download PhantomJS with the following command. The PhantomJS download page is located at . PhantomJS can be installed on various Linux, Windows or Mac platforms. Please copy the download link then download using the wget command like the following command,


The download file has a .tar.bz2 extension. For that, you have to extract the file twice.
First, please follow the following command,

bzip2 -dk phantomjs-2.1.1-linux-x86_64.tar.bz2

Second, please extract the .tar file from PhantomJS with the following command,

tar -xjvf phantomjs-2.1.1-linux-x86_64.tar

3. PhantomJS testing

You need to know, actually, to run PhantomJS, you only need to enter the folder that was extracted and then enter phantomjs-2.1.1-linux-x86_64/bin/the phantomjs file. Now that's the phantomjs file you have to run! To run it please write./phantomjs

4. Added PATH PhantomJS

In order to run the PhantomJS file, you must first add the PATH PanthomJS. This functions so that you can directly call the PhantomJS file with the phantomjs prefix. For example phantomjs filecobaphantom.js. To add the PhantomJS PATH, please write down the location of the phantomjs file in the file .bash_profile. You can use the nano or vim editor.

nano .bash_profile

Please add the location of the phantomjs file on the line export PATH=after the :
sign.For example the phantomjs file is in / home / me / then please write

: /home/my/phantomjs-2.1.1-linux-x86_64/bin /: $ PATH

* Note : If you use the nano editor, after adding PATH, please save it by clicking ctrl + x then press "Y" and enter.

5. Running PhantomJS

To check whether PhantomJS is running, please write a simple PhantomJS script.

console.log ('Hello, world!');
phantom.exit ();

You can write the script using any editor. For example nano, gedit, vim or whatever. If using nano, please write nano filecobaphantom.js then copy the script and paste it. Don't forget to save with ctrl + x then Y then enter.
To run PhantomJS, please write

phantomjs filecobaphantom.js

If the file is executed successfully, then PhantomJS is successfully installed!


How to install PhantomJS on Hosting is very easy. Unlike other JS families such as React.js, Node.js or Express.js. To install phantom.js, you only need to download and then set the PATH only. For those of you who are curious about how to install other JS families, please read How to Install NodeJS on Hosting or  How to Install ExpressJS . If you are a big fan of Laravel, please read How to Install Laravel and How to Upload Laravel Files on Hosting . If you have questions, please contact the Support Team via live chat or send a ticket .

What is Safelink Asia? is a completely free tool where you can create short links. URL security with cryptographic algorithm. Protect your web visitors with a secure link, to avoid viruses, malware, thief, etc. Apart from being free, you get paid! Register now!

Shorten URLs & earn money

So, now you can make money from home, when managing and protecting your links with Safelink Asia. Signup for an account in just 1 minutes. Once you've completed your registration just start creating short URLs and sharing the links with your family and friends. See our proof of payment and publisher rate.

Our best partner

The following are some of our best partners who have worked together on advertising: 401XD Group, KM Panel, MC Project, My Coding, Ilmunesia, Blackexpo Indo, Senja Teduh, Business Media.