Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CPanel integration with JetBrains PhpStorm

Tags:

phpstorm

I created an FTP Account on CPanel. I also tried to configure FTP on JetBrains PhpStorm, but I am not able to establish connection.

I made FTP Accounts as below;

FTP Username: ****@*********.org
FTP server: ****.****.org
FTP & explicit FTPS port:  21

I need suggestion on how to connect to public_html/ folder from JetBrains PhpStorm and then synch files.

like image 613
Ankur Soni Avatar asked Nov 18 '16 07:11

Ankur Soni


2 Answers

Follow those steps:

  1. Go to: File -> New Project from Existing Files...
  2. Select: Web server is on remote host, files are accessible via FTP/SFTP/FTPS
  3. Give a name and a path for the local copy of the project
  4. Select: Add new remote server
  5. Fill all the fields
  6. Select as root folder the public_html folder
like image 186
mclmza Avatar answered Sep 17 '22 05:09

mclmza


There is no reference in the previous answer on how to connect to cpanel instance, I had this issue too.

In PHPStorm's deployment menu there is a field to add the Host, now PHPStorm's connections have a prefixed ftp:// (or sftp, depends what you choose).

Cpanel also has it's own stipulated connection method, it defaults to create your entry host as ftp.yoursite.com

PHPStorm interprets this as ftp://ftp.yoursite.com, thus you get an error.

This is what you should do to connect successfully:

  • use SFTP
  • write your host name as a top level domain (TLD) yoursite.com
  • use port 22
  • write root path with your user name: home/user-name
  • fill in your user name and then password

That worked for me.

like image 21
clusterBuddy Avatar answered Sep 21 '22 05:09

clusterBuddy