Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm watch changes and upload to remote server

Is it possible to tell PhpStorm to watch a file and if the file is changed (like compiling from scss to css) PhpStorm will automatically upload the compiled css file to the remote server?


Solution is "Upload external changes" under "Deployment Options". its uploading my compiled file automatically if I am work around the scss files.

like image 872
xoeoe Avatar asked Oct 31 '22 09:10

xoeoe


1 Answers

Yes. This is done from the "Deployment" section in Phpstorm > Settings (see the screenshot). Take a look at the instructions here: Deploying PHP Applications with PhpStorm.

It involves:

  1. Configuring a deployment server (see 1.1 - 1.3)
  2. Uploading a file to the server (see 3).

Once the server is set up, you can Upload files manually:

Tools > Deployment > Upload to Default Server

Or automatically:

Tools > Deployment > Automatic Upload

I prefer using the manual upload option (with a hotkey) to have more control.

In the screenshot, my deployment server is a local XAMPP htdocs folder on my mac. Your configuration will be different, but it's the same concept.

Setting up a deployment server in PhpStorm

like image 193
Stevethemacguy Avatar answered Nov 09 '22 14:11

Stevethemacguy