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.

wget https://download-cf.jetbrains.com/webide/PhpStorm-2016.1.2.tar.gz

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/phpstorm.sh /usr/local/bin/phpstorm

Now type phpstorm in the terminal to launch the application.

phpstorm

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: 77 Average: 4.8]

15 Responses to “An IDE For PHP: Install PhpStorm on Ubuntu 16.04, 17.04

  • how to remove php storm in ubuntu?

    • Xiao Guoan
      8 years ago

      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
    8 years ago

    Thanks !

  • Ghulam Mustafa Bajwa
    8 years ago

    thanks very great work

  • said elfazni
    8 years ago

    Thank u great job 🙂

  • Javier Parra
    8 years ago

    Muy bueno, gracias!

  • Nilson Lana Machado Pimentel
    8 years ago

    Não funfou no ubuntuMate 16.04.!!

  • alphakappa86
    8 years ago

    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)

    • Xiao Guo-An (Admin)
      8 years ago

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

  • Abdul Ghaffar
    4 months ago

    I’m getting error while launch that phpstorm:command not found

  • Iroshan29
    5 years ago

    This is an outdated document. Oracle java cannot be installed in the way mentioned in the document.

  • Getahun Merga
    5 years ago

    nice bro love u

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here