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:
-
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-servermean the ftp server deamon is running.
- 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
- Make sure remote CentOS file directoryâs permission is correctly: accessible, writable.
- 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!
- Now the new Prject can be editable in PhpStorm, using: Right click -> Upload to folder to sync the file.
- 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.
- What else? It should work perfectly!
