Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once configured, PhpStorm will use the remote PHP interpreter for commands that can be run remote, for example running PHPUnit tests, and a local interpreter for Composer.

Troubleshooting Remote PHP Interpreters

PhpStorm will take all necessary efforts in mapping the local project path in PhpStorm to the remote path. For example for a simple Vagrant configuration (e.g. config.vm.synced_folder "src/", "/srv/website"), the IDE will know how to map all folders under the project's src/ folder to the remote /srv/website path.

In some cases, for example when additional shared folders have been configured, it may be required to add the remote PHP interpreter from a deployment configuration (e.g. SFTP) and configure mappings manually. A mapping is the relation between the project folders, the folders on the remote server, and the URLs to access the data on the server over HTTP. These mappings are used to help PhpStorm find a file or folder in our project or on the remote server.

The easiest way is to map the entire project root folder to a folder on the server, where the project folder structure will be identical on the server. Depending on the server configuration and project layout, it may be useful to specify one or more mappings through the Mappings tab when configuring a deployment server.

In the screenshot below, we're specifying the following relations:

Local path

Path on the remote server

Web path (URL)

Pre

C:\Projects\wordpress-networkmarketing

Pre

/site/wwwroot/wp-content/plugins/jetbrains-networkmarketing

Pre

/wp-content/plugins/jetbrains-networkmarketing

Image Added

In the case where multiple folders should be mapped, which is common for frameworks like Symfony2, Zend Framework, Laravel or CakePHP that typically make use of two main folders, we can configure additional mappings:

Local path

Path on the remote server

Web path (URL)

Pre

C:\Projects\MyProject\application

Pre

/site/application

 

Pre

C:\Projects\MyProject\public

Pre

/site/wwwroot

Pre

/

Image Added

Note the warning shown is because the /application path has no web path specified, which in this setup is perfectly fine.

Note

Note that when folders match multiple relevant mappings, the nearest one is applied.

Align
alignright

HTML
<a href="https://twitter.com/share" class="twitter-share-button" data-via="phpstorm">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<span id="fb-root"></span>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<span class="fb-like" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false" style="position:relative;margin-left:-20px;top:-5px;"></span>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium"></g:plusone>