In this tutorial guide I will take you through the installation of PHPStorm on Ubuntu 21.04.
Features of PHPStorm
PHPStorm is well known for the following features:
- It has intelligent coding assistance, it provides on-the-fly error prevention, auto-completion and code refactoring.
- PHPStorm provides a powerful built-in tools for debugging, testing and profiling your applications.
- PHPStorm supports all cutting edge web development including SASS, SCSS, LESS, Coffeescript etc.
- PHPStorm is built on top of open source intellij platform which has been in development for 15 years.
New Features in PHPStorm 2021.2
- PHPStorm 2021.2 introduces support for generics in PHP. Use of generics via annotations make code safer and more predictable when working with collections, containers etc.
- One of the most highly anticipated features of PHP 8.1 release is enums. An enum in PHP contain a set of cases, can have methods and can be used as a typed hint.
- It has introduced support for array shapes. It support code completion for such annotated arrays reducing time spend on routine typing and protecting you from mistakes.
- It has come with improved extract method refactoring which allows you to split big methods into smaller units and also help eliminate duplicate codes.
- The release comes with a bunch of inspections to reduce the time spend looking for bugs and fixing them.
- Now you can run tests before commit
You don’t have to install java to run PHPStorm because jetbrains runtime is bundled with IDE.
- Ubuntu 21.04 desktop
- User with sudo privileges
- Access to internet
Table of Contents
- Run updates for Ubuntu 21.04 repositories
- Install PHPStorm as snap package
1. Run Ubuntu 21.04 updates
The first thing we can do is to install recent updates into our Ubuntu 21.04 repositories.
$ sudo apt update $ sudo apt upgrade -y
After the update and upgrade is complete, let’s move to install PHPStorm using snap.
2. Install PHPStorm using snap package
I choose to use snap to install PHPStorm because snaps update automatically, PHPStorm will be up to date every time. Use the following to install to install latest version of PHPStorm.
$ sudo snap install phpstorm --classic phpstorm 2021.2.3 from jetbrains✓ installed
You can now launch PHPStorm by typing phpstorm in terminal
Lastly we can learn how to uninstall PHPStorm
3. Uninstall PHPStorm
When you no longer need PHPStorm you can uninstall the package using the following command:
$ sudo snap remove phpstorm phpstorm removed
We have successfully installed PHPStorm using snap package because it is the best if you do not want to run updates every time. In case of any difficulty you can consult PHPStorm Documentation.