UbuntuUbuntu Based

How To Install PhpStorm on Ubuntu 24.04 LTS

Install PhpStorm on Ubuntu 24.04

PhpStorm is a powerful integrated development environment (IDE) specifically designed for PHP developers. With its rich features, including advanced code editing, debugging capabilities, and support for various frameworks, it has become a go-to tool for many professionals in the field. This article will guide you through the process of installing PhpStorm on Ubuntu 24.04, covering multiple methods to suit your preferences.

What is PhpStorm?

PhpStorm is developed by JetBrains and offers a wide array of features that enhance productivity for PHP developers. Key functionalities include:

  • Intelligent Code Assistance: PhpStorm provides smart code completion, on-the-fly error checking, and refactoring tools.
  • Debugging and Testing: Built-in debugging tools allow for easy testing and troubleshooting of PHP applications.
  • Version Control Integration: Seamless integration with Git, SVN, and other version control systems.
  • Support for Frameworks: Comprehensive support for popular PHP frameworks such as Laravel, Symfony, and Zend.

These features make PhpStorm an indispensable tool for both novice and experienced developers looking to streamline their workflow.

Prerequisites for Installation

Before installing PhpStorm on Ubuntu 24.04, ensure that your system meets the following requirements:

  • Operating System: Ubuntu 24.04 or later.
  • RAM: A minimum of 4 GB of RAM is recommended.
  • Disk Space: At least 2.5 GB of free disk space for installation.
  • Java Runtime Environment (JRE): PhpStorm requires JRE 11 or higher. It is bundled with the installation package but can also be installed separately if needed.

If you are unsure about your system specifications, you can check them using the command:

free -h && df -h

Installation Methods

This section covers three different methods to install PhpStorm on Ubuntu 24.04: via Snap package, Flatpak, and manual installation from a tarball. Choose the method that best fits your needs.

Method 1: Installing via Snap Package

Snap is a package management system that simplifies software installation on Linux systems. Installing PhpStorm through Snap is straightforward and ensures you get automatic updates.

Step-by-Step Installation

  1. Open Terminal: You can find it in your applications menu or use the keyboard shortcut Ctrl + Alt + T.
  2. Install Snap (if not already installed):
sudo apt update
sudo apt install snapd
  1. Install PhpStorm:
sudo snap install phpstorm --classic
  1. Launch PhpStorm:

You can start PhpStorm by searching for it in your applications or by running the following command in the terminal:

phpstorm

The `--classic` option allows PhpStorm to access system files outside its confined environment, which is necessary for proper functionality.

Method 2: Installing via Flatpak

If you prefer using Flatpak, another modern package management system that supports sandboxing applications, follow these steps to install PhpStorm.

Step-by-Step Installation

  1. Install Flatpak (if not already installed):
sudo apt update
sudo apt install flatpak
  1. Add the Flathub repository:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  1. Install PhpStorm:
sudo flatpak install flathub com.jetbrains.PhpStorm
  1. Launch PhpStorm:

You can launch PhpStorm using the following command:

flatpak run com.jetbrains.PhpStorm

This method also ensures that you receive updates automatically through Flatpak’s management system.

Method 3: Manual Installation from Tarball

If you prefer a more hands-on approach or need a specific version of PhpStorm, you can manually download and install it from a tarball.

Step-by-Step Installation

  1. Download PhpStorm:

Navigating to the JetBrains website, download the latest tar.gz file for PhpStorm. You can use the following command to download it directly via terminal (replace `<version>` with the actual version number):

Install PhpStorm on Ubuntu 24.04 LTS

wget https://download.jetbrains.com/webide/PhpStorm-.tar.gz
  1. Create an Installation Directory:
sudo mkdir /opt/phpstorm
  1. Extract the Tarball:
sudo tar -xzf PhpStorm-*.tar.gz -C /opt/phpstorm --strip-components=1
  1. Navigating to the Bin Directory:
cd /opt/phpstorm/bin/
  1. Create a Desktop Entry (optional):

This step allows you to launch PhpStorm from your application menu easily. Create a file named `phpstorm.desktop` in `/usr/share/applications/` with the following content:

[Desktop Entry]
Name=PhpStorm
Type=Application
Exec=/opt/phpstorm/bin/phpstorm.sh
Icon=/opt/phpstorm/bin/phpstorm.png
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm
Comment=The smartest PHP IDE
Version=1.0
  1. Start PhpStorm:

You can now start PhpStorm by executing:

./phpstorm.sh

Post-Installation Setup

The first time you launch PhpStorm, you’ll be prompted to configure some initial settings. Here’s what to expect:

  • Selecting a UI theme (light or dark).
  • Selecting plugins to enhance functionality according to your development needs.
  • If you’re migrating from another IDE, you can import settings from previous configurations.

You may also want to create a desktop entry if you haven’t done so during installation. This will allow easy access from your application launcher.

Troubleshooting Common Issues

If you encounter issues during installation or while using PhpStorm, consider these common problems and their solutions:

  • Error: “Command not found” when launching from terminal: Ensure that you have correctly navigated to the directory where `phpstorm.sh` resides or check if it was installed properly.
  • Solved: Permission Denied Errors: If you face permission issues while executing commands, try using `sudo` before commands or check file permissions with `ls -l`.
  • No Internet Connection Error in IDE: Ensure your network settings are correct and that your firewall isn’t blocking connections needed by PhpStorm.
  • Error: “PhpStorm cannot start”: This might occur if Java is not properly installed. Verify that JRE is installed by running `java -version` in the terminal.

Congratulations! You have successfully installed PhpStorm. Thanks for using this tutorial for installing the PhpStorm on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official PhpStorm website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button