How to Install PHPStorm on Ubuntu 24.02, 22.04 or 20.04

This guide will demonstrate how to install PHPStorm on Ubuntu 24.04, 22.04, or 20.04 LTS utilizing the command-line terminal. Methods include using the APT PPA maintained by Jonas Groeger, Snapcraft, or Flatpak with the Flathub repository.

PHPStorm stands as a powerhouse in the world of integrated development environments (IDEs), specifically tailored for the modern web developer. With its robust set of features designed to enhance productivity, PHPStorm supports PHP, HTML, CSS, JavaScript, and many other languages, offering a seamless coding experience. It integrates with version control systems, provides a sophisticated debugging interface, and facilitates database management—all within a user-friendly platform. Its versatility and efficiency make it a top choice for developers looking to streamline their workflow and elevate their coding practices.

Why Choose PHPStorm:

  • Efficiency in Code Management: Offers intelligent coding assistance for faster navigation and code understanding.
  • Integrated Development Tools: This tool comes packed with version control, debugging, and project management tools.
  • Customizable Interface: Allows personalization to suit your workflow and preferences.
  • Cross-platform Support: Available for Linux, Windows, and macOS, ensuring a consistent experience across different operating systems.
  • Extensive Plugin Ecosystem: Enhance your IDE with a wide range of plugins available through JetBrains Marketplace.
  • Database Support: Integrated database tools and SQL support streamline database development tasks.
  • High-level Refactoring: Makes code more maintainable with safe and fast refactoring.
  • Real-time Collaboration: The Code With Me feature enables real-time collaboration for remote pair programming and code reviews.

Choosing PHPStorm means investing in your development capabilities, ensuring a more productive and less cumbersome coding environment. Now, let’s dive into the installation process on Ubuntu.

Install PHPStorm on Ubuntu via APT PPA

Update Ubuntu System Before PHPStorm Installation

The first step involves updating your Ubuntu system’s local package database. We do this to ensure that we have the latest information about what packages and versions are available from Ubuntu’s repositories:

sudo apt update

Once the package database is updated, we proceed to upgrade the system. This operation upgrades all the installed software packages on your system to their latest versions:

sudo apt upgrade

Install Initial Packages For PHPStorm APT PPA

Now, we move on to installing the required packages. These include dirmngr, ca-certificates, software-properties-common, apt-transport-https, curl, and lsb-release. These tools are necessary to add and manage repositories, transfer files, and perform other tasks:

sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl lsb-release -y

Import the JetBrains PPA by Jonas Groeger on Ubuntu for PHPStorm

In this step, we will add the JetBrains Personal Package Archive (PPA) to our system’s list of repositories. This will allow APT to fetch PHPStorm directly from JetBrains’ PPA.

To ensure the authenticity of the packages, we start by importing the GPG key for the JetBrains repository. GPG, or GNU Privacy Guard, is a tool for secure communication that implements the OpenPGP standard. By importing the GPG key, we verify that JetBrains indeed provides the packages in the repository:

curl -s | gpg --dearmor | sudo tee /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg > /dev/null

After the GPG key is imported, we proceed to add the JetBrains PPA to our system’s list of package sources:

echo "deb [signed-by=/usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg] any main" | sudo tee /etc/apt/sources.list.d/jetbrains-ppa.list > /dev/null

Refresh APT Packages Index After PHPStorm PPA Import

We’ve added a new repository in the previous step. Therefore, we need to update our APT package database again to fetch the package information from the newly added JetBrains PPA:

sudo apt update

Install PHPStorm on Ubuntu via APT Command

Finally, we install PHPStorm. At this point, our system knows about the PHPStorm package from the JetBrains PPA, and it’s ready to fetch and install it by running the following APT install command:

sudo apt install phpstorm

Upon running the above command, APT will download PHPStorm any dependencies it needs and install them on your system. After completing the installation, you can launch PHPStorm from your applications menu.

Install PHPStorm on Ubuntu via Snap

Snap, developed by Canonical, is a software deployment and package management system for Linux. It simplifies the installation and maintenance of software and is becoming increasingly popular. In this section, we will explore installing PHPStorm using Snap.

Verifying Snap’s Presence on Your Ubuntu System

As Canonical creates Snap, it comes pre-installed on Ubuntu distributions. However, if for any reason it isn’t present on your system or has been manually removed, you can reinstall it using the following command:

sudo apt install snapd -y

This command installs the Snap Daemon (snapd), a background service responsible for managing and maintaining your Snap packages.

Enable Classic Snap Support For PHPStorm on Ubuntu

Specific Snap packages employ ‘classic’ confinement, a feature that provides snap access to your system’s resources like traditional software. To enable this support for maximum compatibility and smooth operation, a symbolic link (symlink) is created using the following command:

sudo ln -s /var/lib/snapd/snap /snap

This command creates a symlink between’/var/lib/snapd/snap’ and ‘/snap,’ effectively enabling classic Snap support.

Install Core Snap For PHPStorm on Ubuntu

Before installing PHPStorm, it’s crucial to install the ‘core’ snap. The core snap serves as a base for other snaps, providing essential libraries and services they depend upon. This preemptive measure helps to avoid potential conflicts and issues down the line. The command to install the core snap is:

sudo snap install core

Install PHPStorm on Ubuntu via Snap Command

With all the prerequisites, we are now prepared to install PHPStorm. This can be accomplished using the following command:

sudo snap install phpstorm --classic

Here, sudo grants administrative privileges, snap calls the Snap package handler, install is the command to install a package, and ‘phpstorm’ is the package we want to install. The --classic option allows PHPStorm to access your system’s resources like a traditionally packaged application.

Install PHPStorm on Ubuntu via Flatpak and Flathub

Flatpak is a versatile universal package management system for Linux, akin to Snap. Its unique feature is the ability to isolate applications from the rest of your system, thereby enhancing security and mitigating potential conflicts. This section provides a comprehensive walk-through on the installation of PHPStorm using Flatpak and Flathub.

Note: If your system doesn’t currently support Flatpak, it needs to be installed first. Detailed instructions on how to install the most recent supported version of Flatpak on Ubuntu are available in our guide on installing Flatpak.

Enable the Flathub Repository for PHPStorm

Before installing PHPStorm via Flatpak, the initial requisite is to enable the Flathub repository. Flathub is an established hub for hosting Flatpak applications. It essentially serves as a marketplace to access and install various applications.

To incorporate the Flathub repository, execute the following command in your terminal:

sudo flatpak remote-add --if-not-exists flathub

This command incorporates the Flathub repository into your Flatpak configuration. As a result, you gain access to an extensive catalog of applications, including PHPStorm.

Install PHPStorm on Ubuntu via Flatpak Command

With the Flathub repository now integrated, the subsequent phase involves the installation of PHPStorm. For this, the flatpak install command is utilized. Here’s the specific command to install PHPStorm:

flatpak install flathub com.jetbrains.PhpStorm -y

This command installs PHPStorm from the Flathub repository, ensuring you have the most recent stable version of the application.

How to Launch PHPStorm on Ubuntu

Launching PHPStorm on Ubuntu can be accomplished using different approaches. Here, we’ll take you through two fundamental methods, one involving the command-line interface (CLI) and the other one using the graphical user interface (GUI).

CLI Method to Launch PHPStorm

In a Linux environment, one often employs commands to perform various actions. Launching an application like PHPStorm is no exception. The following subsections illustrate how to launch PHPStorm using APT, Snap, and Flatpak commands.

Launching PHPStorm using the APT command:

To launch PHPStorm using the APT command, open your terminal and type:


If PHPStorm is installed properly, this will initiate the Integrated Development Environment (IDE).

Launching PHPStorm using the Snap command:

If you’ve installed PHPStorm using Snap, use the following command in your terminal:

snap run phpstorm

This will launch PHPStorm, given that it’s correctly installed.

Launching PHPStorm using the Flatpak command:

For users who have installed PHPStorm via Flatpak, you can launch it by executing this command in the terminal:

flatpak run com.jetbrains.PhpStorm

As always, PHPStorm will launch if it has been installed appropriately.

GUI Launch Method for PHPStorm on Ubuntu

Launching PHPStorm can be done using the GUI in Ubuntu for users who prefer a more visually oriented method. Here’s the step-by-step process:

  • Click on the Activities menu at your desktop screen’s top left corner.
  • Then select the Show Applications icon at the bottom of the Activities overlay.
  • Scroll through your applications or use the search bar to find PHPStorm.
  • Click on the PHPStorm icon to launch the IDE.
PHPStorm icon in Ubuntu activities menuPin
PHPStorm Application Icon on Ubuntu

First-Time Tips with PHPStorm on Ubuntu

Now that you have successfully installed PHPStorm on Ubuntu, here are some first-time tips on getting the most out of your software:

General Tips for PHPStorm on Ubuntu

  • Optimize Performance: PHPStorm offers a range of settings to optimize performance on Linux. Consider adjusting memory settings in phpstorm.vmoptions to match your system’s capabilities for a smoother experience.
  • Use Keymaps: Familiarize yourself with PHPStorm’s extensive keymap for Linux. It streamlines navigation and enhances productivity by allowing quick access to frequently used features.
  • Enable Font Ligatures: For improved readability, enable font ligatures under Editor → Font. This feature combines multiple characters into a single, more readable form.
  • Configure Code Style: PHPStorm allows customization of code formatting. Set your preferred code style under Settings → Editor → Code Style to ensure consistency across your projects.

Customizations for Enhanced Workflow

  • Themes and Plugins: Customize your IDE’s appearance with themes, and extend its functionality with plugins. Explore the JetBrains Marketplace directly from PHPStorm to find tools that suit your development style.
  • Configure Shortcuts: Create or modify keyboard shortcuts under Settings → Keymap to optimize your workflow. Tailoring shortcuts can significantly reduce development time.
  • Adjust Editor Settings: Tailor the editor’s behavior to your liking. From soft wraps to font sizes, making these adjustments under Editor → General can enhance your coding experience.
  • Live Templates: Utilize live templates to insert common constructs into your code quickly. You can manage these under Settings → Editor → Live Templates.

Version Control Integration

  • Seamless Git Integration: PHPStorm provides comprehensive Git support. Set up your Git configuration under Settings → Version Control → Git to connect with your repositories effortlessly.
  • Use the VCS Operations Popup: Access common version control operations quickly using the Alt + Back Quote (\)` shortcut. This popup allows for fast commits, pushes, pulls, and more.
  • Review Changes Before Commit: Take advantage of PHPStorm’s diff tool to review changes before committing. This practice helps catch unintended changes early.
  • Branch Management: Efficiently manage your branches directly from PHPStorm. The VCS tool window offers a convenient overview of your branch structure, making it easier to switch or merge branches.

Debugging and Testing

  • Configure Xdebug: Set up Xdebug for PHPStorm on Ubuntu for an integrated debugging experience. Adjust your php.ini to enable Xdebug and configure PHPStorm to listen for PHP debug connections.
  • Use the Integrated Terminal: PHPStorm includes an integrated terminal that can be used for running PHP scripts, managing version control, and more. Access it via View → Tool Windows → Terminal.
  • Testing Frameworks Integration: PHPStorm supports major PHP testing frameworks. Configure your preferred testing framework under Settings → Languages & Frameworks → PHP → Test Frameworks to run tests directly from the IDE.
  • HTTP Client: Utilize PHPStorm’s built-in HTTP client to test APIs without leaving the IDE. It’s a powerful tool for web development, accessible via Tools → HTTP Client → Test RESTful Web Service.

With these tips, you’ll be well on your way to maximizing your productivity and enjoyment while using PHPStorm on Ubuntu. Whether it’s through customizing the IDE to suit your preferences, leveraging integrated version control, or utilizing debugging and testing tools, PHPStorm offers a comprehensive environment to support your development projects.

Default UI of PHPStorm by JetBrains on UbuntuPin
First Look at PHPStorm’s Interface on Ubuntu

PHPStorm Additional Commands on Ubuntu

In this section, we’ll explore the processes of updating and removing PHPStorm on your Ubuntu Linux system using various command-line methods. Each package manager has unique commands for performing these operations, and we’ll explore those associated with APT, Snap, and Flatpak.

Update PHPStorm

We regularly update software packages, including PHPStorm, to ensure we benefit from the latest features, bug fixes, and security enhancements. Here’s how to update PHPStorm with different package managers.

APT PHPStorm Update Command

To update PHPStorm using APT, we’ll first update the package list to ensure we have information about the latest versions of all packages, including PHPStorm. After that, we’ll upgrade the packages. The following commands execute these steps:

sudo apt update
sudo apt upgrade

Snap PHPStorm Update Command

Updating PHPStorm with Snap is straightforward and requires a single command:

sudo snap refresh

Flatpak PHPStorm Update Command

Flatpak also allows easy updating of PHPStorm with a simple command:

sudo flatpak update

Each command updates all out-of-date packages, a recommended practice to keep your system secure and running smoothly.

Remove PHPStorm

If, for some reason, you wish to remove PHPStorm from your Ubuntu Linux system, here’s how you can do it.

APT PHPStorm Remove Command

To remove PHPStorm using APT, issue the following command:

sudo apt remove phpstorm

If you don’t plan on reinstalling PHPStorm or using the third-party APT PPA for other JetBrains products, you can also remove the repository and GPG key with these commands:

sudo rm /etc/apt/sources.list.d/jetbrains-ppa.list
sudo rm /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg

Snap PHPStorm Remove Command

sudo snap remove phpstorm

Flatpak PHPStorm Remove Command

Lastly, to uninstall PHPStorm using Flatpak, use the command:

sudo flatpak uninstall com.jetbrains.PhpStorm


In this guide, we walked through the steps to install PHPStorm on Ubuntu using three different methods, offered some starting tips for first-timers, and delved into customization, version control, and debugging to help you get the most out of your coding environment. PHPStorm is a powerful IDE that can significantly boost your productivity with its array of features tailored for web development. Remember, the key to mastering PHPStorm lies in exploring its functionalities and tweaking it to fit your workflow. So, dive in, play around with the settings, and don’t be afraid to make it your own. Happy coding!

Leave a Comment

Your Mastodon Instance
Share to...