94

How can I delete (and not simply close) a project in PHPStorm?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
automatix
  • 14,018
  • 26
  • 105
  • 230
  • 11
    Delete from Recent Projects List ... or physically from the disk? If 2nd -- then it's not possible to do from IDE -- you have to do it manually using your file manager (Explorer/Finder/etc). If first -- press Delete button in v6 (or click on "x" in v5) when hovering over the project name in Recent Projects list when NO project is opened. – LazyOne Mar 11 '13 at 12:48
  • I thought, there would be something like workspaces like in eclipse. OK, thank you! – automatix Mar 11 '13 at 13:41
  • 13
    It looks like its "fn+delete" on hover for Phpstorm6 – goksel Apr 20 '13 at 15:23
  • 1
    We can modify `.idea/modules.xml` file manually, if other options can't be reached – vp_arth Nov 11 '19 at 09:56

13 Answers13

115

**Two Approaches for PHPSTORM 2018.3 Version **

A. Eternal Removal or Deletion from Hardware and Phpstorm IDE

  Please visit the folder 'PhpstormProjects' and delete the project file manually. If you do so, you will see the folder disappear from Phpstorm explore window. This might be weird, but true.

B. Remove from the recent project panel of Phpstorm 2018.3 (The folder after such removal will hide and a creation of the same name of project will restore the removed from the recent project panel.)

    1. Click  File > Close project 

    2. From Recent projects, select project, press the fn(on normal keyboard -       key between right Alt and Ctrl, not windows key)+Delete
Tommy Yan
  • 11
  • 3
Petre Sosa
  • 2,097
  • 1
  • 23
  • 19
  • 9
    On Windows 7/WebStorm 9, when you close the project and see the recent list, you can also hover your mouse over the project and hit the Backspace key and it will prompt you to delete it. – Topher Fangio Oct 30 '14 at 22:37
  • 1
    I didn't need to press Fn. Just Delete. – Gordon Nov 29 '14 at 08:42
  • Note that you shouldn't click on the project (this opens it again), just hover your mouse over it and then press Delete or Backspace (just as Gordon, I didn't need to press Fn at the same time). I'm using PhpStorm 8 on Ubuntu 14. – Nic Wortel Jan 06 '15 at 14:25
  • 1
    Honestly, I do not think this is user-friendly. – luqo33 Jun 11 '15 at 11:34
28

Backspace did the trick for me (Windows 7 + PHPStorm 7.1.3). You might want to try Fn+Backspace as well.

godzillante
  • 1,174
  • 1
  • 17
  • 32
13

I know this post is a little old, but for MAC OS X phpStorm 6*, on the welcome to JetBrains PhpStorm page (under the recent projects use arrow keys up/down to select the project you want to remove, the hold the fn+delete.

Cheers

Diego Antunes
  • 848
  • 1
  • 7
  • 8
  • old FN+delete... how convenient. :s, anyway, thanks for sharing it. – MEM Oct 21 '13 at 15:50
  • It's the keyboard shortcut for deleting stuff in PhpStorm. It's the same for deleting files. Also, this is really old now… – callumacrae Jun 02 '14 at 16:29
11

Follow this simple steps:

  1. Just close project by using file menu.
  2. Select project name from Recent Projects at left side panel by using up/down arrow keys.
  3. Now just press Del key on keyboard.
8
  1. Click File > Close project
  2. From Recent projects, select project, press the Fn + Delete on your keyboard

If you want delete a project entirely, delete the ".idea" folder within the project under Finder. This folder is hidden by default (i:e that's because it starts with a dot "." ). You will need to enable "View Hidden Files/Folders" in Finder

williamukoh
  • 566
  • 6
  • 9
  • 2
    This should be the accepted answer because the .idea folder identifies a folder as a PhPStorm project folder. in Windows and Nix systems – toesslab Aug 04 '15 at 14:06
6

For 2017/2018/2019/2020 versions, go to:

File->Open Recent->Manage Projects...

and click the X (that appears when hovering over an option) to delete it from the Projects list. This just removes the reference; it doesn't delete files from the disk.

jabbascript
  • 345
  • 1
  • 6
  • 13
6

year 2019. PhpStorm v2018.3.5 - can't detach the project after attached. There's no "Close Project" in File menu, and no "Remove from Project View" in context menu as documentation says. Seems like a bug.

Just can't get rid of that extra project I've attached. Only one thing helped: removal of the .idea sub directory.

important note: it's about project Attach when you can't remove it from the Project view.

UPDATE/SOLVED:

Here's how to remove accidentally attached project from the current Project view:

  1. .idea/modules.xml

you can either edit that file (remove that new/added entry, easy to find) or remove that entire file (don't worry, it will be re-created on restart).

  1. Also it could've been added to .idea/vcs.xml (don't remove it, just find the corresponding <mapping ...> entry in it and remove, it's under VscDirectoryMappings)

  2. Also it can be listed in .idea/<projectname>.iml file (find it in module > component > orderEntry, see module-name attribute), remove from there too.

  3. restart the PhpStorm.

you will see no attached projects again.

I didn't find any UI options to do this (Mac OS Catalina, PhpStorm 2020.1, same on previous/older versions).

Roman86
  • 1,990
  • 23
  • 22
  • Have you tried to use the answer provided by jabbascript? That works perfectly for me, and "doesn't work" doesn't look like a legit answer to me then – Nico Haase May 18 '20 at 13:39
  • @NicoHaase you mean removing the project from the recent list (Manage Projects)? Yes, I tried. It does nothing to attached project. Attached project is different - it's when you go "File -> Attach Project...". After that you will see another project in the Project tab. And it just can't be removed out of there – Roman86 May 28 '20 at 16:39
  • 1
    Thanks, that helped me … you missed something - the folder is .idea not idea ;) – MonTea Sep 09 '20 at 09:22
5

I had multiple projects opened in same window. Removed the one project by right click -> 'Remove from Project View'

It only removes from list, not from hard drive.

R Sun
  • 1,353
  • 14
  • 17
  • 1
    This answer is especially applicable to the latest version of PHP Storm 2018.3 which now lets you attach a project to an existing project when you open a project. If you need to then detach the project, this answer is how you achieve this. – alexkb Nov 23 '18 at 00:45
  • their documentation says same. I have no such menu item. And I can't find that action with actions lookup (Mac OS PhpStorm 2020.1) – Roman86 May 28 '20 at 16:59
3
  1. Select the project in project view
  2. Edit -> Remove project from view

Alternatively hit Delete.

(Default Keymap Settings)

Saskia
  • 1,046
  • 1
  • 7
  • 23
2

in phpStorm 7 on windows, selecting project/delete does delete the files erc but does NOT remove it from the "recent Projects" list. I found that highlighting it, then pressing Backspace is the key combination to remove it from the list! Maybe it has changed in v7.

ChrisH
  • 127
  • 1
  • 11
2

Apparently jetbrains can't decide on one way?

For me on Windows 7 highlighting the project and then windowkey + del did the trick

isimmons
  • 2,016
  • 2
  • 20
  • 32
2

In my PhpStorm 7.1 (OSx), there is a "Clear List" link in the menu, under 'File' > 'Open Recent' that clears your entire list.

William Choy
  • 1,291
  • 9
  • 7
2

Actually you cannot DELETE a project by pressing "delete" or "backspace" (or clicking the "x" in the upper right corner) in the recent projects list. These operations will only remove the project from being listed in the recent projects list.

You can check this out by looking at the project folders in the directory that WebStorm creates under your user name.

By the way I have WebStorm v.10 running on Win 7 x64 and none of the steps listed here by other users allow me to actually delete a project. The only way I have found out is manual.

This would work in at least Windows 7:

Navigate to the "WebstormProjects" directory under your Windows user name, and delete the project directory. This will remove it from the recent projects list the next time you launch WebStorm.

user100487
  • 268
  • 1
  • 6
  • 15