How to Make PhpStorm Faster?

by jay patel




These tips can make your PhpStorm experience faster and more delightful

 

PhpStorm is a great IDE for PHP development. Its code intelligence system makes it much easier to work with large projects over a normal text editor.

However, PhpStorm can do much more than that. It is packed with tons of extra features you may need in your development process. The only drawback of using such a large app, is its performance. Especially with multiple projects open, it can become sluggish, unresponsive or take too much of your ram.

This being said, I recommend that you have a powerful enough machine when running PhpStorm. But if you don’t want to spent a small fortune upgrading your machine just yet;

I have a few quick tips which made my experience with PhpStorm much faster and more delightful (and hopefully yours too).

 

Disable Reopen Last Project on Startup

By default, PhpStorm opens your last opened project on startup. This is alright when you work on the same project most of the days, but when you switch projects often, you might want to disabled this.

This prevents that you have to wait for the whole (wrong) project to be loaded. Instead you will get the overview of your most recent projects.

Go to: preferences  ->  type ‘reopen’ -> Uncheck ‘Reopen last project on startup’

 

phpstrome

 

Disable Unused Plugins

PhpStorm comes with a ton of pre-installed plugins. This also means there are probably much more than you need, or even know about.

I found that disabling all the plugins you don’t use, gives a great improvement in project loading time and overall responsiveness.

This is a must try; it probably takes less than 5 minutes, and gives you much more joy in your day to day work.

Go to: preferences  ->  plugins  and disable everything you don’t need.

 

improve phpstrome performance

 

ASP? I work with PHP on Linux. SQL? I got an app for that. Drupal? Never developed for that…

Don’t worry about disabling too much, it will notify you when a plugin depends on another plugin, and it will ask you to enable a plugin when it thinks it is useful in a certain situation.

The actual improvement of this depends on how many plugins you can and want to disable, but for me the difference was noticeable right away.

I always check the enabled plugins after every PhpStorm update, to look for new plugins that may have been added.

 

Bonus Tip: Clear Caches

PhpStorm generates a lot of cache files for your projects. Clearing these won’t probably speed up the IDE, but can give you some free space back. I found that after an update of PhpStorm, it sometimes creates a new cache folder, and it doesn’t delete the old one. This is of course a waste of your free disk space.

If you used PhpStorm for a long time, with multiple version updates and never cleared the caches, the size of these folders can add up to several GB’s. You can easily claim this space back with this tip.

 

On Mac:  Search for folders named like  ‘PhpStorm2016.x’  or similar in  ~/Library/Caches  and remove them.

 

jetbrains

On Windows:  Search for folders with ‘.WebIde’ in its name in  c:\Users\\  and remove them.

You can also clear the caches (for the current version) by going to:

File  -> Invalidate Caches / Restart

Note that it needs to re-index all your projects after you cleared the cache. This can take a while and it may be slow while doing this, so just let it settle for a minute or two.

 

Here also some shortcut to improve your performance.

 

Nithin Meppurathu

  1. Select code in a method then hit ALT+CMD+M to create a new method from selection.
  2. You can create an interface from any class. Refactor -> Extract -> Interface

 

Jeffrey Way

Command/Control+Shift+Backspace. This will take you to your last edit point.

 

Abhimanyu Sharma

  1. Press Ctrl+Alt+L to reformat the code.
  2. Use ‘Source code Pro‘ font it’s looks great.
  3. Use ‘Key Promoter‘ plugin to get reminder of keyboard shortcuts

 

Ryan

Double press “Shift” brings up a global search. Very useful.

 

Kennon Bickhart

There are a few that I have found super useful so far.
  1. CMD+SHIFT+A – Find Action… It’s similar to CMD+SHIFT+P in Sublime. Allows you to search for functionality in the editor.
  2. SHIFT+SHIFT – Search Everywhere – A beefier version of Sublime’s CMD+P
  3. em>Setup your coding standards in Preferences > Code Style. Then when in a file, hit CMD+OPT+L to format the whole file, or selected code, to those standards. I still miss Sublime’s Abacus plugin, since PhpStorm isn’t as good as aligning variable signs, but it works well enough.
  4. CTRL+OPT+I – Auto-indent Lines. – Doesn’t tweak your coding style, just properly indents the code you have typed.

 

Gareth Evans

The remote bash commands are really useful. I have one set up with a key command that will start behat tests on a VM or remote machine of the feature file that’s currently in focus prompting you for additional params!

 

Patrick Noonan

If your cursor is on a function or class name, hit command+B to jump to its declaration.

 

I hope these tips are helpful in archiving a better and faster experience with PhpStorm and your day to day work.



Leave a Reply

Your email address will not be published. Required fields are marked *

   Confirm you are not a spammer
   Notify me of follow-up comments by email.