93

I'm using Eclipse PHP Development Tools. What would be the easiest way to access a file or maybe create a remote project trough FTP and maybe SSH and SFTP?.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
levhita
  • 2,161
  • 2
  • 21
  • 31
  • 2
    Nice question. I was looking a long time for this but I always just went with Dreamweaver in the end. – Saif Bechan Apr 01 '10 at 13:23
  • 6
    Just a word of warning about Aptana - I downloaded it because of this question. It's a vast plug-in that does a lot more than just ftp-type things. As such it adds things all over your Eclipse installation - including advertisements for Adobe. There also seems to be no documented way of removing it. For me, this was a disaster that totally messed up my Eclipse configuration. So be warned - know what you're getting into with Aptana. – delany Jul 28 '10 at 23:26

6 Answers6

227

Eclipse natively supports FTP and SSH. Aptana is not necessary.

Native FTP and SSH support in Eclipse is in the "Remote System Explorer End-User Runtime" Plugin.

Install it through Eclipse itself. These instructions may vary slightly with your version of Eclipse:

  1. Go to 'Help' -> 'Install New Software' (in older Eclipses, this is called something a bit different)
  2. In the 'Work with:' drop-down, select your version's plugin release site. Example: for Kepler, this is
    Kepler - http://download.eclipse.org/releases/kepler
  3. In the filter field, type 'remote'.
  4. Check the box next to 'Remote System Explorer End-User Runtime'
  5. Click 'Next', and accept the terms. It should now download and install.
  6. After install, Eclipse may want to restart.

Using it, in Eclipse:

  1. Window -> Open Perspective -> (perhaps select 'Other') -> Remote System Explorer
  2. File -> New -> Other -> Remote System Explorer (folder) -> Connection (or type Connection into the filter field)
  3. Choose FTP from the 'Select Remote System Type' panel.
  4. Fill in your FTP host info in the next panel (username and password come later).
  5. In the Remote Systems panel, right-click the hostname and click 'connect'.
  6. Enter username + password and you're good!
  7. Well, not exactly 'good'. The RSE system is fairly unusual, but you're connected.
  8. And you're one smart cookie! You'll figure out the rest.

Edit: To change the default port, follow the instructions on this page: http://ikool.wordpress.com/2008/07/25/tips-to-access-ftpssh-on-different-ports-using-eclipse-rse/

geoff
  • 2,251
  • 1
  • 19
  • 34
  • 1
    This is Awesome, so nice and so straightforward. Thanks @Rendall – pal4life Feb 13 '14 at 16:56
  • RSE's FTP support isn't the same luxury as Aptana used to have, it bothers me that customizing eclipse always has to be this demotivating. – Simon Hiemstra Feb 24 '14 at 14:22
  • 1
    Try Netbeans IDE. More straightfoward than eclipse. It synchronizes everything and you still benefiting from the PHP validators. – Alfonso Fernandez-Ocampo Dec 07 '14 at 11:13
  • Can the RSE be used to do [this](http://stackoverflow.com/questions/30384361/eclipse-remote-debug-pre-launch-script)? – dtmland May 21 '15 at 21:14
  • 1
    Are there upload/download hotkeys or toolbar icons, so I can upload/download the file that's open in the edit panel? – TARKUS Aug 11 '15 at 17:33
  • I placed a "Remote Systems"-view into my main perspective to improve usability. But I must say: Netbeans wins on this topic! – Diego 72 Sep 16 '15 at 14:05
  • In Eclipse/Oxygen I selected Work with `--All Available Sites--`. Then in the search results, I went to `General Purpose Tools`; and under that menu was `Remote System Explorer End-User Runtime`. – Joe Oct 31 '18 at 02:29
  • this makes a separate view and saves files to a temp directory. How do I automatically upload existing files when I save? – john k Dec 11 '19 at 22:03
45

Install Aptana plugin to your Eclipse installation.

It has built-in FTP support, and it works excellently.

You can:

  • Edit files directly from the FTP server
  • Perform file/folder management (copy, delete, move, rename, etc.)
  • Upload/download files to/from FTP server
  • Synchronize local files with FTP server. You can make several profiles (actually projects) for this so you won't have to reinput over and over again.

As a matter of fact the FTP support is so good I'm using Aptana (or Eclipse + Aptana) now for all my FTP needs. Plus I get syntax highlighting/whatever coding support there is. Granted, Eclipse is not the speediest app to launch, but it doesn't bug me so much.

Dan
  • 2,086
  • 11
  • 71
  • 137
Hendy Irawan
  • 20,498
  • 11
  • 103
  • 114
  • 25
    for those who read this post, read the warning post too - Aptana will mess up your Eclipse (I know what it means to have your workspace ruined and I don't recommend that ;)) – Luka Ramishvili May 16 '11 at 06:01
  • Aptana looks pretty cool. I'm going to download the standalone version and give it a try... thanks – Tobi Apr 20 '12 at 05:44
  • Not really an FTP plug-in, more like a web developing plugin with FRP feature. @Rendall answer suited me better! – JDuarteDJ Jan 14 '14 at 18:54
  • Aptana gives me an access denied message when trying to download their product. Perhaps it stands to show the lack of product quality, too? – Rick Mac Gillis Oct 18 '16 at 17:32
36

have you checked RSE (Remote System Explorer) ? I think it's pretty close to what you want to achieve.

a blog post about it, with screenshots

PW.
  • 3,727
  • 32
  • 35
  • 1
    The best thing is that when you re-open eclipse, it takes you right to the directory that you were working in when you last closed. For UTF-8, right click on any file or folder and select properties. In the info tab, change file encoding to "UTF-8". It gets applied to all files and folders for that connection. – Zero Mar 06 '11 at 13:04
3

SFTP Plug-in: http://www.jcraft.com/eclipse-sftp/ :)

3

I'm not sure if this works for you, but when I do small solo PHP projects with Eclipse, the first thing I set up is an Ant script for deploying the project to a remote testing environment. I code away locally, and whenever I want to test it, I just hit the shortcut which updates the remote site.

Eclipse has good Ant support out of the box, and the scripts aren't hard to make.

Internet Friend
  • 1,082
  • 7
  • 10
  • Even for solo projects I usually use Subversion, this is just an odd case. I guess that deploying with ant is very similar than subversion. – levhita Sep 18 '08 at 19:38
1

As none of the other solutions mentioned satisfied me, I wrote a script that uses WinSCP to sync local directories in a project to a FTP(S)/SFTP/SCP Server when eclipse's autobuild feature is triggered. Obviously, this is a Windows-only solution.

Maybe someone finds this useful: http://rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/

x-ray
  • 3,279
  • 5
  • 24
  • 37
  • I fixed my website, the link should work again. No time to post anything else at the moment, sorry. – x-ray Jul 16 '19 at 19:37