William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

using PhpStorm edit Remote PHP Project

using PhpStorm edit Remote PHP Project

I have a PhpStorm installed in local Windows, while having a remote CentOS 6.2 Server hoisted in godaddy.com.
How to edit ‘web apps reside in remote CentOS 6.2 Server’ within ‘local phpStorm env’?
Such as Laravel, Symfony2, cakePHP, worldpress project?
The following is the steps:

  1. Make sure a ftp server is running on centos 6.2, such as vsftpd. So local phpStorm can ftp access remote Linux server. In my CentOS 6.2:
    $ ps -e | grep ftp
    30261 ?        00:00:00 sftp-server

    mean the ftp server deamon is running.

  2. In PhpStorm IDE:
    File | New Project From Existing Files
    | Create New Project: Chooise Your Scenario
    | Web server is on remote host, files are accessible via FTP/SFTP/FTPS

  3. Make sure remote CentOS file directory’s permission is correctly: accessible, writable.
  4. Following the steps, config:
    – FTP Type. Here is SFTP (port 22)
    – remote file directory, e.g. /home/user/mvc/
    – remote web server root URL, e.g. http://example.com/
    – specify root folder on the remote server, e.g. /home/ussr/laravel/blog/
    – Specify project web path on remote server, e.g. http://example.com/laravel/blog/
    After done the config, it will auto sftp remote folder to locally PhpStorm Repository.
    Pretty cool!

  5. Now the new Prject can be editable in PhpStorm, using:
    Right click -> Upload to folder to sync the file.
  6. Also Menu -> Run to debug the updating. For debug, make sure XDEBUG is configured in both remote CentOS php.ini as well as local PhpStorm (Ctrl+Alt+S).
    So can debug remote web app in a local phpStorm environment.

  7. What else? It should work perfectly!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: