Changing IDE default directories used for config, plugins, and caches storage
Common cases when you may need to change the default locations of the IDE files:
- user profile drive runs out of space
- disk is slow and you want to use faster HDD or SSD for caches
- default user profile points to the UNC path unsupported by the IDE
- home directory is on a network drive
- user profile directory is not detected correctly (Java bug 4787931)
- you want to create a portable installation on a USB stick
- home directory is encrypted and slows down the IDE or causes caches corruption
- caches should be excluded from the home directory backup
- antivirus or search indexer is scanning the home directory affecting IDE performance
- idea.config.path
- idea.system.path
- idea.plugins.path
- idea.log.path
Example:
idea.config.path=c:/work/idea/caches/trunk-config
idea.system.path=c:/work/idea/caches/trunk-system
idea.plugins.path=c:/work/idea/caches/trunk-plugins
- IDEA_PROPERTIES — IntelliJ IDEA
- CLION_PROPERTIES — CLion
- APPCODE_PROPERTIES — AppCode
- PYCHARM_PROPERTIES — PyCharm
- RUBYMINE_PROPERTIES — RubyMine
- DATAGRIP_PROPERTIES — DataGrip
- STUDIO_PROPERTIES — Android Studio
- WEBIDE_PROPERTIES — WebStorm
- PHPSTORM_PROPERTIES — PhpStorm
- GOLAND_PROPERTIES — GoLand
- RIDER_PROPERTIES — Rider
- RUSTROVER_PROPERTIES — RustRover
For example: IDEA_PROPERTIES=C:\Users\USER\idea.properties
The order in which IDE will read idea.properties files is as follows:
- Environment variable (%IDE%_PROPERTIES)
- HOME\idea.properties (where HOME is the user's home directory on the system)
- IDE_HOME\bin\idea.properties
- Default IDE configuration directory
Unlike .vmoptions file handling, idea.properties file with the higher priority doesn't undefine or discard variables already defined in the file location with lower priority. If there is the same variable defined in multiple properties files, the value of the variable from the higher priority file will be used, this way you can override the defaults already defined in IDE_HOME\bin\idea.properties in another file in the IDE default config directory or defined via the %IDE%_PROPERTIES environment variable.
Changing the default location of the IDE files using the Toolbox App
If you use the Toolbox App, note that the Toolbox App provides the possibility to set a custom location for each installed IDE in its own settings.
To change the default location of a particular tool, hover an IDE item in the Toolbox Tools tab, press a gear icon, click Settings | Configuration | Custom JVM options file location | System, plugins, config and logs directory.
Please sign in to leave a comment.
Yes, uncommented those lines & they didn't take effect. Strange corporate policy stuff is afoot I think.
Jem Mawson, make sure to uncomment the lines in the file. Copying is not needed unless you are on Mac.
I changed the values *and* copied the idea.properties from $IDE_HOME/bin to $HOME. Neither seems to have had an effect. v13.0.2-IC
I tried to change the values but it didnt worked. There will be created a new folder in my profile. I use IntelliJ IDEA 13.0.1.
I am glad you said that. I was just about to not do so... I found "config" and "system" in the directory and the other two seem to be subdirectories of "system"... I copied these to my SDD drive and restarted Idea. It took a minute for IDEA to figure out what was going on and then worked fine on my grails project. After this I saw at least some of the disk activity on the SDD.
The ID for Rider is missing
Hello,
I created a new folder in my Windows user account like this: "C:/Users/<username>/Configurations/PHPStorm" and placed in it all content of "C:/Users/<username>/.PhpStorm2018.2".
Also, I edited the idea.propierties located in "C:/Users/<username>/Configurations/PHPStorm/config/idea.propierties" to change configuration directories:
idea.config.path=C:/Users/<username>/Configurations/PHPStorm/config
idea.system.path=C:/Users/<username>/Configurations/PHPStorm/system
idea.plugins.path=${idea.config.path}/plugins
IDEA_PROPERTIES=C:/Users/<username>/Configurations/PHPStorm/config
And finally, I erased "C:/Users/<username>/.PhpStorm2018.2" folder.
The problem is that when I open PHPStorm again, the directory "C:/Users/<username>/.PhpStorm2018.2" is recreated.
What I'm doing wrong?
Awesome, thanks for the info, should make things nice and smooth :)
You'd need to change the location of the properties file itself as described at the end of the document (using the environment variable).
Note that you can sync settings using JetBrains Account instead: https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html (Share your settings with the Settings Sync plugin).
One last thing, it created the custom idea.properties file inside of C:\Users\MyName\.PhpStorm2018.2\config, but I'm wanting to change the location of the config folder to be G:\OneDrive\AppData\PhpStorm\config....
So do I copy over the config dir to the new location and add
idea.config.path=G:\OneDrive\AppData\PhpStorm\config
To the copy in the original location, or do I try to make the change to the original one in the installation directory.
While I'm asking, for keeping sync between two system, (never running at same time), should I also sync the system directory as well? I know one minor peeve is every time I go from one machine to the other, I have to re setup deployment options for every project (connections are on both machines, but I have to set which one is default and the directory mapping).
Ah, DOH! Thanks. I misread that it it would be in the one it created. I'm getting to old to be up programming 28 hours straight... LOL
Comments are available only in the original file inside the IDE installation directory, they are not available in the copy of this file that is created when you use Help | Edit Custom Properties.
"Follow the comments in IDE_HOME\bin\idea.properties file to change the defaults"
Um I had it create the idea.properties file, and this is the only thing in it:
The main thing I want to achieve is moving where scratch files are stored. I thought they were 'per project', and on my office computer I created one to throw code in, then went away for the weekend, and had no access to it on my laptop. (The project directory is synced via OneDrive). Very frustrating. Workaround for now is having a directory in the project called .ht-scratches set to be expluded from upload and save files in there
For Clion, the correct environment variable is CL_PROPERTIES. At least for 2018.1 on Linux.
Thanks, added Rider and GoLand.
IDEA_PROPERTIES is the environment variable that must be set in the system, it's not a property in the file.
#1
idea.properties in Default IDE configuration directory (assuming it is/was <SYSTEM DRIVE>\Documents and Settings\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>) are ignored.
Windows 7 Professional 64bit SP1
IntelliJ Idea 2017.2.6
#2 Also, why does *every* update ignore/discard these settings, so that I have to re-do them manually all the time?
1. Yes
2. It edits the same file you would edit manually
A couple of questions:
Yes, changing xmx helped. Thanks.
Invalid JVM option for 32-bit mode? See https://intellij-support.jetbrains.com/hc/articles/207241105.
Environment variable is unique for every product, check the <product>.bat file if you are on Windows to see what variable is used.
CL_PROPERTIES
PYCHARM_PROPERTIES
DATAGRIP_PROPERTIES
How does this work with multiple products? AFAIU the approach from above would not work if I like to tweak DataGrip, RubyMine PHPStorm and WebStorm for example.
For DataGrip the following is commented out: `idea.config.path=${user.home}/.DataGrip/config` and `idea.system.path=${user.home}/.DataGrip/system`. I cannot imagine that setting both to some generic path like ${user.home}/.JetBrains will work as probably each IDE will fight with the settings of the other.
Am I missing something here or is the proposal from above only suitable for a single product? Or is there a product specific env variable available? Something like
IDEA_PROPERTIES_DataGrip?
The recommended way of settings VM options and properties is already at the very top of the article.