Installing and running PHPStorm on Ubuntu

From IntelliJ-Wiki

Jump to: navigation, search



In this tutorial, you will:

  1. Install the Oracle (Sun) Java Development Kit.
  2. Install PHPStorm.
  3. Launch PHPStorm.

What This Tutorial Is Not About

  • This tutorial does not teach you PHP programming.
  • This tutorial does not teach you working in Ubuntu.


  • Intel Pentium III/800 MHz or higher (or compatible).
  • 512 MB RAM minimum, 2 GB RAM recommended.
  • Ubuntu 11+ is installed on your computer.
  • GNOME or KDE desktop.
  • 1024x768 minimum screen resolution.

Installing Oracle (Sun) JDK

Unlike in case of Java development, you do not need Java Software Development Kit (JDK) in your work. However, you need Java Runtime Environment (JRE) to run PHPStorm itself. Because JRE is included as a part in JDK, you need to have a JDK downloaded and installed on your computer.

You can use Open JDK but it does not guarantee high performance. Therefore it is suggested that you install Oracle (Sun) JDK 1.6 or higher. No doubt, you can do it in several ways. Below we will install it from the Oracle official repository. Oracle Java has been removed from the official Ubuntu repositories due to some Java licence issues.

Before you install it, remove OpenJDK, if you have it installed:

$ sudo apt-get purge openjdk*

To install Java 8/7/6, do this:

In order not to get issues with the add-apt-repository command, install the following package:

$ sudo apt-get install software-properties-common

Add the PPA:

$ sudo add-apt-repository ppa:webupd8team/java

Update the repo index:

$ sudo apt-get update

Install Java 8:

$ sudo apt-get install oracle-java8-installer

Or, install Java 7:

$ sudo apt-get install oracle-java7-installer

Or, install Java 6:

$ sudo apt-get install oracle-java6-installer

Then the system calculates the free space that will be used by the packages to be installed and asks you whether you want to continue. Click y to continue (6).

Accepting the License

The system displays an information message with the license agreement (Figure 3).

Figure 3. License information message.

Use the Tab keyboard button to move the focus to OK (1) as shown in Figure 4:

Figure 4. Focus moved to OK.

Click OK (1) to pass to accepting the license (Figure 5):

Figure 5. Accepting the license. Step 1.

Use the Tab keyboard button to switch the focus from No (1) to Yes (2), as shown in Figure 6):

Figure 6. Accepting the license. Focus moved to Yes.

Click Yes (1) to start package installation.

Checking the Installation

When the installation is completed, the terminal again shows the command line prompt. Let's check that we have a Java Virtual Machine installed (Figure 7). To do that, type the following command in the Terminal (1):

java -version

The system reports the Java version installed (2).

Figure 7. Checking Java installation.

Installing PHPStorm

IntelliJ IDEA is available in two editions: Ultimate Edition and Community Edition. In this tutorial we will deal with the Community Edition, which is distributed for free and does not required any license. All we need to do is download and extract the IntelliJ IDEA archive.

Downloading PHPStorm

In the browser of your choice, open the PHPStorm Download page (Figure 8):

Figure 8. PHPStorm download page.

Switch to the Linux tab (1) and click the Download (2) button. In the Opening PHPStorm tar,gz dialog box, that opens (Figure 9), choose the Open with Archive Manager option (1) and click OK (2).

Figure 9. Starting the download.

The Download dialog box (Figure 10) shows the download progress:

Figire 10. Download in progress.

Extracting the Downloaded Archive

When the download is completed, the Archive Manager opens (Figure 11) showing the downloaded archive (1). Click Extract (2).

Figure 11. Downloaded archive.

The system displays the Extract dialog box (Figure 12) where we will specify the PHPStorm installation home, that is, the folder where it will be available from.

Figure 12. Creating a folder for PHPStorm installation.

As you can see, by default the system suggests to extract the archive to the /home/user/ directory. However it makes sense to have a separate folder for PHPStorm. Click the Create folder (1) button and specify the folder name, for example, PHPStorm. Figure 13 shows the Extract dialog box with a new folder PHPStorm added to the list:

Figure 13. Extract dialog box: PHPStorm folder added.

Select the PHPStorm folder (1), choose the All files option (2) to have the entire archive extracted, and click Extract (3).

The system starts extracting the archive showing the progress in the dialog box (Figure 14):

Figure 14. Extracting files from archive: progress.

When the extraction is completed, the dialog box (Figure 15) changes the appearance so you can choose what to do with the extracted files.

Figure 15. Extraction completed successfully. Opening the archive.

As we are going to start PHPStorm right now, let's open the extracted archive by clicking Show the files (1).

Running PHPStorm

Now that we are through with extracting the archive, we can finally start PHPStorm. At the last step of the archive extraction, we decided to open the extracted archive. Let's examine what we have (Figure 16).

Figure 16. PHPStorm installation home.

As you can see, the PHPStorm executable file (1) is located in the bin subfolder (2) of the PhpStorm-111.296 (3) under PHPStorm (4), </nowiki>user</nowiki> (5), and home (6) respectively. To launch the, we need the Terminal.

Open the Terminal by choosing Applications | Accessories | Terminal and type the following commands in it (Figure 17):

Figure 17. Terminal: launching the executable.

(1) To switch to the bin folder, type:

cd /home/user/PHPStorm/PhpStorm-111.296/bin

(2) To change the status of so it can be executed, type:

chmod +x

(3) To run, type:


The system displays the Enter License Data dialog box (Figure 18):

Figure 18. Registering license.

This tutorial supposes that you do not have a permanent license, so choose the Evaluate for free for 30 days option (1) and click OK (2).

Accept the license agreement (Figure 19) by selecting the Accept all terms of license (1) check box and click OK (2).

Figure 19. Accepting the terms of license.

PHPStorm starts (Figure 20):

Figure 20. PHPStorm is running.

Congratulations! You have successfully downloaded and launched PHPStorm so your development environment is ready for your first PHPStorm project to start.

Personal tools