How to Install PhpStorm on Ubuntu 20.04

The programming world is full of decisions. Once you have chosen the programming language you want to use, the next question appears: What IDE(Integrated Development Environment) Should I use to develop the program?

Well today we will focus on one of the most popular web development language i.e. PHP and the most popular IDE for this programming language which I personally use is PHPStorm.

PhpStorm is an IDE (Integrated Development Environment) for PHP web developers, which is engineered by JetBrains but It’s not available free of cost.

It supports PHP 5.3 and above versions. PhpStorm is built on the IntelliJ IDEA platform, which is written in Java.

PhpStorm is a cross-platform IDE that provides consistent experience on the Windows, macOS, and Linux operating systems.

JetBrains PhpStorm is an innovative and cross-platform IDE that become popular over the last couple of year. It is perfect for working with Drupal, Symfony, Laravel, WordPress, Zend Framework, Joomla, CakePHP, and other frameworks.

Users can extend the IDE by installing plugins created for PhpStorm or write their own plugins. The software also communicates with external sources like XDebug.

Key Features of PhpStorm:

  • Smart Code completion
  • Syntax Highlighting
  • Extended code formatting configuration
  • On-the-fly error checking
  • Code folding
  • Zero-configuration debugging makes it really easy to debug your PHP applications.
  • You can profile your applications with Xdebug or Zend Debugger and check aggregated reports in PhpStorm.
  • All the cutting edge web development technologies are supported including HTML 5, CSS, SASS,SCSS, LESS, CoffeeScript, ECMAScript Harmony, Jade templates, etc.
  • Duplicated Code Detector
  • PHAR support
  • The smartest JavaScript Editor is bundled with the IDE, offering code completion, validation and quick fixes, refactorings, JSDoc type annotations support, JavaScript debugging and unit testing, support for JavaScript Frameworks.
  • PhpStorm provides a streamlined experience for the full development cycle with new languages such as TypeScript, CoffeeScript, and Dart.
  • PhpStorm provides tools and code assistance features for working with databases and SQL in your projects.
  • Perform many routine tasks right from the IDE with support for Vagrant support, Docker, Composer, and more.
  • PhpStorm provides a unified UI for working with many popular Version Control Systems, ensuring a consistent user experience across git, GitHub, SVN, Mercurial, and Perforce.

Basic system requirements for PhpStorm:

These are the minimum system requirements for installing PhpStorm on a Linux System.

  • RAM: 2 GB of Free RAM minimum, 8 GB of total system RAM (Recommended)
  • CPU: Any modern CPU, Multi-core CPU. PhpStorm supports multithreading for different operations and processes making it faster the more CPU cores it can use.
  • Disk space: 2.5 GB and another 1 GB for caches, SSD drive with at least 5 GB of free space (Recommended).
  • Monitor resolution: 1024×768, 1920×1080 (Recommended)
  • GNOME or KDE desktop

Note: You do not need to install Java to run PhpStorm because JetBrains Runtime is bundled with the IDE (based on JRE 11).

But if necessary you can follow the below steps to install Java:

Installing Java

Type the following command to check whether Java is already installed on your system.

$ java -version

You can skip this step if Java is already installed, and if Java is not installed then follow the steps below.

In this tutorial I will install OpenJDK 11 and the installation is pretty straightforward.

First update the package index and then Install the OpenJDK 11 package by typing the following command.

$ sudo apt update && sudo apt install openjdk-11-jdk

This article explains two methods of installing PhpStorm IDE on Ubuntu 20.04.

Choose the installation method that is most appropriate for your environment.

Method 1: Installing PhpStorm as a Snap Package

The easiest way to install PhpStorm on Ubuntu 20.04 is by using the snap packaging system.

PhpStorm snap package is distributed and maintained by JetBrain.

A snap package is a type of universal Linux package that you can enjoy irrespective of the distro. Its an self-contained software packages that include the binary all dependencies needed to run the application.

All you need is the snap service pre-configured, In the case of Ubuntu 20.04, it comes with snap pre-installed.

If snapd package is not already installed then you can install it by running following command.

$ sudo apt install snapd

Note: Snap packages can be installed from either the command-line or via the Ubuntu Software application.

This is actually the Snap version of the PhpStorm. It can be used on any Linux distribution that has Snap support.

Open your terminal (Ctrl+Alt+T) and type the following command to install the PhpStorm IDE package.

$ sudo snap install phpstorm --classic

That’s It. Now you can open the PhpStorm application with the help of Activities search bar.

If you are not comfortable with the command line, open Ubuntu Software, search for “PhpStorm” and install the application.

Method 2: Installing PhpStorm IDE from Source

Compiling PhpStorm IDE from the source allows you to install the latest PhpStorm version. Follow the following steps to install PhpStorm using the source code method.

Step #1

Open a terminal (CTRL+ALT+T) and execute the below commands to update packages.

$ sudo apt update && sudo apt upgrade

Step #2

Download the latest PhpStorm source code package from the official website. You can do so using wget Command.

$ sudo wget https://download-cdn.jetbrains.com/webide/PhpStorm-2021.2.3.tar.gz

Or visit official website and download from there.

Credit: jetbrains.com

Step #3

Once the download is complete extract the .tar.gz file with the help of tar command.

Extract the tarball to a directory that supports file execution.

For example, to extract it to the recommended /opt directory, run the following command:

$ sudo tar -xzf PhpStorm-2021.2.3.tar.gz -C /opt

Note: Do not extract the tarball over an existing installation to avoid conflicts. Always extract it to a clean directory.

Step #4

Execute the phpstorm.sh script from the extracted directory to run PhpStorm.

$ sudo ./phpstorm.sh

As soon as you run the script the PhpStorm application will start.

At this step, you have successfully installed PhpStorm IDE application on Ubuntu 20.04 system.

To create a desktop entry of the application: From the main menu of IDE, click Tools -> Create Desktop Entry.

Starting PhpStorm

You can launch the PhpStorm IDE application with the help of the Launcher icon created on the desktop.

OR run the phpstorm.sh shell script in the installation directory under bin/.

When you run PhpStorm for the first time, some steps are required to complete the installation, customize your instance, and start working with the IDE.

1. Select the user interface theme:

Select whether you want to use the default Darcula or Light theme.

Image Credit: jetbrains.com

2. Download and install additional plugins:

If necessary, click Plugins in the left-hand pane and download and install additional plugins from the PhpStorm plugins repository.

Image Credit: jetbrains.com

When you click Start using PhpStorm, it will show the Welcome screen.

Image Credit: jetbrains.com

How to Uninstall PhpStorm from Ubuntu 20.04

For some reason, If you want to uninstall PhpStorm application, refer following steps.

Step #1

Delete the installation directory.

Step #2

Remove following directories.

Syntax:
~/.config/JetBrains/<product><version>
~/.cache/JetBrains/<product><version>
~/.local/share/JetBrains/<product><version>
Example:
~/.config/JetBrains/PhpStorm2021.2
~/.cache/JetBrains/PhpStorm2021.2
~/.local/share/JetBrains/PhpStorm2021.2

Conclusion

I hope that now you have a good understanding of How to Install PhpStorm on Ubuntu 20.04 LTS Focal Fossa.

If anyone does have any questions about what we covered in this guide then feel free to ask in the comment section below and I will do my best to answer those.

Source:

If you like our content, please consider buying us a coffee.

Buy Me A Coffee

We are thankful for your never ending support.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.