• Blogs (9)
    • đŸ“± 236 - 992 - 3846

      📧 jxjwilliam@gmail.com

    • Version: ‍🚀 1.1.0
  • using PhpStorm edit Remote PHP Project

    Blogs20142014-03-12


    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!