An IDE For PHP: Install PhpStorm on Ubuntu 16.04, 17.04

For those of you who don’t know, PhpStorm is a cool, lightning-smart IDE for PHP developers. It’s a commercial and cross-platform product from Jetbrains and can run on Linux, Mac OS and Windows. This tutorial will explain how to install Phpstorm on Ubuntu 16.04/17.04.

Install Oracle Java 8 on Ubuntu 16.04/17.04

Because phpstorm is a Java program, so first we need to install Oracle Java on Ubuntu and the latest stable version is Oracle Java 8. We’ll install it via a PPA.

Remove OpenJDK

sudo apt-get remove openjdk*

Add the PPA and install Oracle Java 8 with following 3 commands.

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install java-common oracle-java8-installer

During the installation process you will need to accept the Oracle License agreement. Once installed we need to set Java environment variables such as JAVA_HOME on Ubuntu 16.04/17.04.

sudo apt-get install oracle-java8-set-default

source /etc/profile

The above two commands will set the correct Java environment variables.

Install phpstorm on Ubuntu 16.04/17.04

First go the official website and download the tar archive. If you like command line, you can use wget to download. The latest version is 2016.1.2 at the time of this writing. You may need to change the version number if you are reading this at a later time.


Once downloaded, open a terminal window and change your working directory to the download directory, then extract the .tar.gz file with this command:

tar xvf PhpStorm-2016.1.2.tar.gz

A new folder called PhpStorm-145.1616.3 will be created within the current working directory. It’s better to move this PhpStorm-145.1616.3 directory to /opt.

sudo mv PhpStorm-145.1616.3/ /opt/phpstorm/

Create a symlink

sudo ln -s /opt/phpstorm/bin/ /usr/local/bin/phpstorm

Now type phpstorm in the terminal to launch the application.


If you are new to PhpStorm, select the second option and hit the OK button.

Install PhpStorm on Ubuntu

Read and agree the privacy policy. You won’t sign you life away.

Install PhpStorm on Ubuntu

If you are not ready to purchase a license to use PhpStorm, you can select the 30 day free trial option.

Install PhpStorm on Ubuntu

Accept the license agreement.

Install PhpStorm on Ubuntu

In the next window, select a theme, color, font and hit OK button.

Install PhpStorm on Ubuntu

Next, you need to enter your password to create a launch script and desktop entry.

After that’s done, you can start a new project in PhpStorm.

Install PhpStorm on Ubuntu

Next time, you can start PhpStorm from Unity Dash.

Install PhpStorm on Ubuntu

If for any reason you want to uninstall PhpStorm, simply delete /opt/phpstorm/ directory and all subdirectories and files in it.

sudo rm /opt/phpstorm/ -R

I hope this article helped you to install PhpStorm on Ubuntu 16.04/17.04. As always, if you found this post useful, then subscribe to our free newsletter. You can also follow us on Google+Twitter or like our Facebook page.

Rate this tutorial
[Total: 44 Average: 4.8]
  • asad

    how to remove php storm in ubuntu?

    • Xiao Guoan

      Thanks for your comment!

      If you read carefully, you can see that the phpstorm binary is located at /opt/phpstorm/ directory. So to remove phpstorm from Ubuntu, you just have to remove the /opt/phpstorm/ directory and all the content within /opt/phpstorm with this command.

      sudo rm -r /opt/phpstorm

  • dayglor

    Thanks !

  • Ghulam Mustafa Bajwa

    thanks very great work

  • Worked like a charm 🙂 Thanks

  • said elfazni

    Thank u great job 🙂

  • Javier Parra

    Muy bueno, gracias!

  • Nilson Lana Machado Pimentel

    Não funfou no ubuntuMate 16.04.!!

  • alphakappa86

    Hi, thx for the article. Can you help me with some trouble? I was start PhpStorm and got the error “Failed to save settings. Please restart PhpStorm”. I think that is filesystem permissions (chmod) problem. Can you try to give me a some solution? Ubuntu 16.04, PhpStorm 2016.2.2. (sorry for bad english, its not my native language)

    • Use command to start PhpStorm. It may give you more detailed messages for troubleshooting.