php

Installing PHPStorm on Ubuntu 20.04 LTS

PHPStorm is one of the best IDE from JetBrains for PHP web development. In this article, I am going to show you how to install PHPStorm on Ubuntu 20.04 LTS. So, let’s get started.

Installing Ubuntu Make

You can easily install PHPStorm IDE using Ubuntu Make on Ubuntu 20.04 LTS. Ubuntu Make is available in the official package repository of Ubuntu 20.04 LTS.

First, update the APT package repository cache as follows:

$ sudo apt update

Now, install Ubuntu Make with the following command:

$ sudo apt install ubuntu-make

To confirm the installation, press Y and then press <Enter>.

Ubuntu Make should be installed.

Now, run the following command to check if the umake command is available:

$ umake --version

Installing PHPStorm:

You can easily install PHPStorm using the following umake command:

$ umake ide phpstorm

By default, PHPStorm IDE should be installed in the path $HOME/.local/umake/ide/phpstorm. If you want, you can change it. But the default path is good enough. You don’t have to change it.

Once you’re done, press <Enter>.

Ubuntu Make should download PHPStorm from the internet.

At this point, PHPStorm should be installed.

Now, add execute permission to the PHPStorm desktop file as follows:

$ chmod +x ~/.local/share/applications/jetbrains-phpstorm.desktop

Finally, reboot your computer for the changes to take effect.

$ sudo reboot

Once your computer boots, you can access PHPStorm from the Application Menu of Ubuntu 20.04 LTS.

Uninstalling PHPStorm:

If you want to uninstall PHPStorm IDE, run the following command:

$ umake --remove ide phpstorm

PHPStorm should be removed from your Ubuntu 20.04 LTS machine.

Upgrading PHPStorm:

If there is any new version of PHPStorm available, PHPStorm IDE will notify you. You can upgrade PHPStorm IDE from the IDE itself.

Ubuntu Make does not provide any method of upgrading PHPStorm IDE. If you badly want to upgrade PHPStorm using Ubuntu Make, you can use a little trick. Just remove PHPStorm and install it again using Ubuntu Make.

To remove PHPStorm, run the following command:

$ umake --remove ide phpstorm

To install PHPStorm again, run the following command:

$ umake ide phpstorm

Initial Configuration of PHPStorm:

First, start PHPStorm from the Application Menu of Ubuntu 20.04 LTS.

As you’re running PHPStorm for the first time, you will have to do some initial configuration.

From the Import PhpStorm Settings From… dialog, you can import settings from older version of PHPStorm (if you had it installed before).

If It’s the first time you’re installing PHPStorm, select Do not import settings and click on OK.

Now, select a UI theme and click on Next: Desktop Entry.

Make sure Create a desktop entry for integration with system application menu checkbox is not checked as PHPStorm desktop icon is already available.

Then, click on Next: Launcher Script.

If you want to open PHPStorm projects from the command line, check Create a script for opening files and projects from the command line and click on Next: Featured plugins.

PHPStorm will recommend you some popular plugins. If you need any of them, just click on Install to install it.

Once you’re done, click on Start using PHPStorm.

Now, you will be asked to activate PHPStorm. You can buy a PHPStorm license from JetBrains and activate it from here.

If you want to try out PHPStorm before buying the license, select Evaluate for free and click on Evaluate. You will get 30 days of free access to PHPStorm IDE.

PHPStorm is loading.

PHPStorm should start. Now, you can use PHPStorm for your web development projects.

Basics of PHPStorm:

You click on Create New Project to create a new PHP project and follow the instructions depending on your project requirements.

You can open existing project in PHPStorm. To do that, click on Open and follow the instructions.

You can also create a new project from a GitHub repository. To do that, click on Get from Version Control and follow the instructions.

In this section, I am going to create a new empty PHP project and discuss some of the configuration options of PHPStorm.

If you want to follow along, click on Create New Project, select PHP Empty Project, select a project Location and click on Create.

A new PHP empty project should be created.

Now, right click on the project folder, and click on New > PHP File to create a new PHP script.

Type in a file name and click on OK.

A new PHP script should be created.

Now, type in the following lines in the file and save the file.

<?php
echo "Hello World from LinuxHint.\n";

Now, run the PHP script by pressing <Alt> + <Shift> + <F10> or from Run > Run…

Then, select the PHP script configuration.

PHPStorm may not find the PHP interpreter installed on your computer automatically. So, you may see this window. Click on Fix.

Click on the button.

Click on the + button.

Select the interpreter path.

The interpreter should be added. Now, click on OK.

Click on OK.

Click on Run.

The PHP script should run and the output should be displayed below.

Changing Editor Font and Color Scheme:

To configure the font or color scheme, go to File > Settings.

To change the font, go to the Editor > Font tab. You can change the font family, font size, line spacing from here. You can also check Enable font ligatures to enable special font characters.

To change the color scheme, go to the Editor > Color Scheme tab. Now, you can select any of the available color schemes from the dropdown menu.

Once you’re done, click on OK.

The changes should be applied.

So, that’s how you install PHPStorm on Ubuntu 20.04 LTS. Thanks for reading this article.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.