Migrate from Eclipse to PhpStorm
Switching from Eclipse to PhpStorm, especially if you've been using Eclipse for a long time, requires understanding some fundamental differences between the two IDEs, including their user interfaces, compilation methods, shortcuts, project configuration and other aspects.
You can import either an Eclipse workspace or a single Eclipse project. To do this, click Open on the Welcome Screen or select File | Open in the main menu.

If you'd like to import your existing run configurations from Eclipse, consider using this third-party plugin.
The first thing you'll notice when launching PhpStorm is that it has no workspace concept. This means that you can work with only one project at a time. While in Eclipse you normally have a set of projects that may depend on each other, in PhpStorm you have a single project that consists of a set of modules.
If you have several unrelated projects, you can open them in separate windows.
If you still want to have several unrelated projects opened in one window, as a workaround you can attach them to the current project.
The second big surprise when you switch to PhpStorm is that it has no perspectives.
It means that you don't need to switch between different workspace layouts manually to perform different tasks. The IDE follows your context and brings up the relevant tools automatically.

Just like in Eclipse, in PhpStorm you also have tool windows. To open a tool window, click its name in the tool window bar:

If the tool window bar is hidden, you can open any tool window by hovering over the corresponding icon in the bottom-left corner:

If you want to make the tool window bar visible for a moment, you can press Alt twice and hold it.
If you don't want to use the mouse, you can always switch to any toolbar by pressing the shortcut assigned to it. The most important shortcuts to remember are:
Project: Alt01
Commit: Alt00
Terminal: AltF12
Another thing about tool windows is that you can drag, pin, unpin, attach and detach them:

For more information, refer to Arrange tool windows and Tool window view modes.
To help store/restore the tool windows layout, there are several useful commands:
Window | Layouts | Save Current Layout as New: save the arrangement as a new layout.
Window | Layouts | Restore Current Layout: reset changes in your current layout. (also available via ShiftF12)
For more information, refer to Layouts.
Windows management in PhpStorm is slightly different from Eclipse. You can't open several windows with one project, but you can detach any number of editor tabs into separate windows.
By default, PhpStorm doesn't change the selection in the Project tool window when you switch between editor tabs. However, you can enable it in the Project tool window settings:

PhpStorm has no Save button. Since in PhpStorm you can undo refactorings and revert changes from Local History, it makes no sense to ask you to save your changes every time.
Still, it's worth knowing that physical saving to disk is triggered by certain events, including compilation, closing a file, switching focus out of the IDE, and so on. You can change this behavior via Settings/Preferences | Appearance & Behavior | System Settings:

If you are an experienced Eclipse user, you are familiar with save actions: the actions triggered automatically on save, such as reformatting code, organizing imports, and so on.
PhpStorm also features save actions that you can find and enable in Settings/Preferences | Tools | Actions on Save.
On top of that, PhpStorm offers you to run the corresponding actions automatically on commit:

Or manually:
Code | Reformat Code CtrlAlt0L
Code | Optimize Imports CtrlAlt0O
Code | Code Cleanup
PhpStorm shortcuts are completely different from those in Eclipse.
The table below shows how the top Eclipse actions (and their shortcuts) are mapped to PhpStorm (you may want to print it out to always have it handy).
note
If you choose a keymap specific to your operating system (Default for Windows/Linux or macOS for macOS), there may be conflicts between shortcuts used in PhpStorm and your OS. To avoid such conflicts, we recommend tweaking your OS shortcut settings (refer to Keymap for more details).
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Code completion | CtrlSpace | Basic completion | CtrlSpace |
- | - | Type-matching completion | CtrlShiftSpace |
- | - | Statement completion | CtrlShiftEnter |
Quick access | Ctrl+3 | Search everywhere | Double Shift |
Maximize active view or editor | Ctrl+M | Hide all tool windows | CtrlShiftF12 |
Open type | Ctrl+Shift+T | Navigate to class | Ctrl0N |
Open resource | Ctrl+Shift+R | Navigate to file | CtrlShift0N |
- | - | Navigate to symbol | CtrlAltShift0N |
Next view | Ctrl+F7 | - | - |
- | - | Recent files | Ctrl0E |
Quick outline | Ctrl+O | File structure | CtrlF12 |
Move lines | Alt+Up/Down | Move lines | AltShift0↑/AltShift0↓ |
Delete lines | Ctrl+D | Delete lines | Ctrl0Y |
Quick fix | Ctrl+1 | Show intention action | AltEnter |
Quick switch editor | Ctrl+E | Switcher | CtrlShiftTab |
- | - | Recent files | Ctrl0E |
Quick hierarchy | Ctrl+T | Navigate to type hierarchy | Ctrl0H |
- | - | Navigate to method hierarchy | CtrlShift0H |
- | - | Show UML popup | CtrlAlt0U |
Last edit location | Ctrl+Q | Last edit location | CtrlShiftBackspace |
Next editor | Ctrl+F6 | Select next tab | Alt0→ |
Run | Ctrl+Shift+F11 | Run | ShiftF10 |
Debug | Ctrl+F11 | Debug | ShiftF9 |
Correct indentation | Ctrl+I | Auto-indent lines | CtrlAlt0I |
Format | Ctrl+Shift+F | Reformat code | CtrlAlt0L |
Surround with | Ctrl+Alt+Z | Surround with | CtrlAlt0T |
- | - | Surround with live template | CtrlAlt0J |
Open declaration | F3 | Navigate to declaration | Ctrl0B |
- | - | Quick definition | CtrlShift0I |
Open type hierarchy | F4 | Navigate to type hierarchy | Ctrl0H |
- | - | Show UML popup | CtrlAlt0U |
References in workspace | Ctrl+Shift+G | Find usages | AltF7 |
- | - | Show usages | CtrlAltF7 |
- | - | Find usages settings | CtrlAltShiftF7 |
Open search dialog | Ctrl+H | Find in Files | CtrlShift0F |
Occurrences in file | Alt+Ctrl+U | Highlight usages in file | CtrlShiftF7 |
Copy lines | Ctrl+Alt+Down | Duplicate lines | Ctrl0D |
Extract local variable | Ctrl+Alt+L | Extract variable | CtrlAlt0V |
Assign to field | Ctrl+2/Ctrl+F | Extract field | CtrlAlt0F |
Show refactor quick menu | Ctrl+Alt+T | Refactor this | CtrlAltShift0T |
Rename | Ctrl+Alt+R | Rename | ShiftF6 |
Go to line | Ctrl+L | Navigate to line | Ctrl0G |
Structured selection | Alt+Shift+Up/Alt+Shift+Down | Select word at caret | Ctrl0W/CtrlShift0W |
Find next | Ctrl+J | Find next | F3 |
Show in | Ctrl+Alt+W | Select in | AltF1 |
Back | Ctrl+[ | Back | CtrlAlt0← |
Forward | Ctrl+] | Forward | CtrlAlt0→ |
For Eclipse users who prefer not to learn new shortcuts, PhpStorm provides the Eclipse keymap which closely mimics its shortcuts:

When you don't know the shortcut for some action, try using the Find action feature available via CtrlShift0A. Start typing to find an action by its name, see its shortcut, or call it:

Both Eclipse and PhpStorm provide coding assistance features, such as code completion, code generation, quick-fixes, live templates, and so on.
To apply a quick-fix in PhpStorm, press AltEnter:

All quick-fixes are based on inspections configured in Settings/Preferences | Editor | Inspections:

If you want to apply a quick-fix to several places at once (that is to a whole folder, module or even a project), you can do it by running the corresponding inspection via Code | Analyze Code | Run Inspection By Name... or by running the whole batch of inspections via Code | Running Code Cleanup with profile ''{0}''…:

Apart from outright problems, PhpStorm also recognizes code constructs that can be improved or optimized via the so-called intentions (also available with AltEnter):

Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Quick fix | Ctrl+1 | Show intention action | AltEnter |
The key action for generating code is Code | Generate, available via AltInsert:

PhpStorm provides different types of code completion, which include:
Basic completion
Second basic completion
Type-matching completion
Second type-matching completion
Statement completion
By default, PhpStorm doesn't show the Documentation popup for the selected item, but you can enable it in Settings/Preferences | Editor | Code Completion | Show the documentation popup in:

If you don't want to enable this option, you can manually invoke this popup by pressing Ctrl0Q when you need it:

When the caret is within the brackets of a method or a constructor, you can get the info about the parameters by calling Parameter Info with Ctrl0P:

Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Code completion | Ctrl+Space | Basic completion | CtrlSpace |
- | - | Type-matching completion | CtrlShiftSpace |
- | - | Statement completion | CtrlShiftEnter |
In PhpStorm, Live templates let you insert frequently used constructs into source code.
Abbreviation | Expands to ... |
---|---|
|
|
|
|
|
|
|
|
The list of available templates can be found in Settings | Editor | Live Templates. There you can also add your own templates or modify any existing ones.
In addition to 'regular' templates, PhpStorm offers the so-called postfix templates. They are useful when you want to apply a template to an expression you've already typed. For instance, type a variable name, add null
and press Tab. PhpStorm will turn your expression into a if (...==null){...}
statement.
To see a complete list of available postfix templates, go to Settings | Editor | General | Postfix Completion.
The surround with templates is another addition that works similarly to live templates but can be applied to the selected code with CtrlAlt0J.
To define your own surround with template, go to Settings | Editor | Live Templates and use $SELECTION$
within the template text:
try {
$SELECTION$
} catch ($TYPE$ $$$VARIABLENAME$) {
Logger::log($$$VARIABLENAME$);
$END$
}
The following table maps the shortcuts for the most common refactorings in Eclipse with those in PhpStorm:
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Extract local variable | Ctrl+Alt+L | Extract variable | CtrlAlt0V |
Assign to field | Ctrl+2 | Extract field | CtrlAlt0F |
Show refactor quick menu | Alt+Shift+T | Refactor this | CtrlAltShift0T |
Rename | Ctrl+Alt+R | Rename | ShiftF6 |
Sometimes, refactorings may affect a lot of files in a project. PhpStorm not only takes care of applying changes safely, but also lets you revert them. To undo the last refactoring, switch the focus to the Project tool window and press Ctrl0Z.
Below is a map of the most common search actions and shortcuts:
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Open search dialog | Ctrl+H | Find in Files | CtrlShift0F |
References in workspace | Ctrl+Shift+G | Find usages | AltF7 |
- | - | Show usages | CtrlAltF7 |
- | - | Find usages settings | CtrlAltShiftF7 |
Occurrences in file | Alt+Ctrl+U | Highlight usages in file | CtrlF7 |
The table below roughly maps the navigation actions available in Eclipse with those in PhpStorm:
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Quick access | Ctrl+3 | Search everywhere | Double Shift |
Open type | Ctrl+Shift+T | Navigate to class | Ctrl0N |
Open resource | Ctrl+Shift+R | Navigate to file | CtrlShift0N |
- | - | Navigate to symbol | CtrlAltShift0N |
Quick switch editor | Ctrl+E | Switcher | CtrlTab |
- | - | Recent files | Ctrl0E |
Open declaration | F3 | Navigate to declaration | Ctrl0B |
Open type hierarchy | F4 | Navigate to type hierarchy | Ctrl0H |
- | - | Show UML popup | CtrlAlt0U |
Quick outline | Ctrl+O | File structure | CtrlF12 |
Back | Ctrl+[ | Back | CtrlAlt0← |
Forward | Ctrl+] | Forward | CtrlAlt0→ |
PhpStorm code formatting rules (available via Settings | Editor | Code Style) are similar to those in Eclipse, with some minor differences. You may want to take note of the fact that the Use tab character option is disabled by default, the Indent size may be different, etc.

If you would like to import your Eclipse formatter settings, go to Settings | Editor | Code Style | PHP, click , click Import Scheme and select the exported Eclipse formatter settings (an XML file).
Note that there may be some discrepancies between the code style settings in PhpStorm and Eclipse. For example, you cannot tell PhpStorm to put space after (but not before). If you want PhpStorm to use the Eclipse formatter, consider installing the Eclipse code formatter plugin.
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Format | Ctrl+Shift+F | Reformat code | CtrlAlt0L |
Similarly to Eclipse, PhpStorm also has Run/debug configurations dialog that you can access either from the main toolbar, or the main menu. Compare the related shortcuts:
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Run | Ctrl+Shift+F11 | Run | ShiftF10 |
Debug | Ctrl+F11 | Debug | ShiftF9 |
- | - | Make | CtrlF9 |
- | - | Update application | CtrlF10 |
The debuggers in Eclipse and PhpStorm are similar but use different shortcuts:
Eclipse | PhpStorm | ||
---|---|---|---|
Action | Shortcut | Action | Shortcut |
Step into | F5 | Step into | F7 |
- | - | Smart step into | ShiftF7 |
Step over | F6 | Step over | F8 |
Step out | F7 | Step out | ShiftF8 |
Resume | F8 | Resume | F9 |
Toggle breakpoint | Ctrl+Shift+B | Toggle breakpoint | CtrlF8 |
Evaluate expression | Ctrl+Shift+I | Evaluate expression | AltF8 |
PhpStorm supports Git, Mercurial, Subversion, Perforce and other version control systems (VCS).
When you open a project located under a VCS root, PhpStorm automatically detects this root and suggests adding it to the project settings.
To change version control-related project settings (or manually add a VCS root), go to Settings | Version Control.
PhpStorm works perfectly with multi-repository projects. Just map your project directories to VCS, and the IDE will take care of the rest. For Git and Mercurial, the IDE will even offer you synchronized branch control, so that you can perform branch operations on multiple repositories simultaneously. For more information, refer to Manage Git branches.
Every VCS may require specific settings, for example, Path to Git executable, GitHub/Perforce credentials, and so on:

Once you've configured the VCS settings, you'll see the Version Control tool window Alt09.
To check out a project from a VCS, click Get from Version Control on the Welcome Screen, or in the main VCS menu.
The Changes view shows your local changes: both staged and unstaged. To simplify managing changes, all changes are organized into changelists. Any changes made to source files are automatically included in the active changelist. You can create new changelists, delete the existing ones (except for the Changes one), and move files between changelists.

Right-click the unversioned file or folder you want to ignore in the Local Changes tab of the Version Control tool window Alt09 or in Project tool window and select Git | Add to .gitignore or Git | Add to .git/info/exclude.
If you want ignored files to be also displayed in the Local Changes view, click on the toolbar and select Ignored Files.

The Log tab of the Git tool window lets you see and search through the history of commits. You can sort and filter commits by the repository, branch, user, date, folder, or even a phrase in the description. You can find a particular commit, or just browse through the history and the branch tree:

PhpStorm lets you create, switch, merge, compare and delete branches. For these operations, either use Branches from the main or context VCS menu, or the VCS operations popup (you can invoke it by pressing Alt0`, or the widget on the right of the status bar:

All VCS operations are available from the VCS main menu:
Action | Shortcut |
---|---|
Version Control tool window | Alt09 |
VCS operations popup | Alt0` |
Commit changes | Ctrl0K |
Update project | Ctrl0T |
Push commits | CtrlShift0K |
A lot of PhpStorm features are available without any configuration right after you launch it. Still, to take full advantage of running, deploying, and debugging your PHP application, refer to the following sections:
note
For more information, refer to QuickStart Guide.
Thanks for your feedback!