Local Deploy in IntelliJ IDEA, PhPStorm, PyCharm, RubyMine: Configuration steps

Introduction:

On a local system, I often tend to have an external source repository within the web server's document root, such as htdocs. Sometimes the local files are actually mounted on the host computer via a SAMBA share from a Virtual machine, but these are just details.
As such IDE/Editor specific files, such as local version-control files, which I decisively came to love in Jetbrain's product-line, will not reside in the web-root. Additional security constraints can be set with ease, file access flags enforced, different partitions can be used and so on. Another aspect is that different version control systems can be employed without giving much thought to file ignore lists or CVS details.

Step by Step:

In your Editor's menu go to Tools Deployment Configuration. Click the plus (+) symbol to add a new Deployment configuration- and declare the deployment-name as expressive as possible. In the Connection Tab, set the Type to Local or mounted folder and set the Upload/Download project files textbox to the path of your local webserver's document-root.


PhPStorm 6 showing the Deployment Configuration

Next in the Mappings Tab, set the local Path to your working directory outside the web-server directory, and set the Deployment Path and Web Path to \ . Click Add another Path
Set the excluded Paths if necessary. You may set herein additional project folders which you do not want to end up in the web-server's project directory.
PhPStorm 6 showing the Deployment Configuration

Finally, make sure you ticked the automatic upload.



Note: There is no difference in the configuration steps on other platforms, such as Linux and MacOS, except for the paths themselves.
LihatTutupKomentar