{"id":19610,"date":"2014-12-30T17:10:01","date_gmt":"2014-12-30T17:10:01","guid":{"rendered":"https:\/\/blog.jetbrains.com\/phpstorm\/?p=8353"},"modified":"2024-01-09T14:59:27","modified_gmt":"2024-01-09T13:59:27","slug":"developing-on-pantheon-with-phpstorm","status":"publish","type":"phpstorm","link":"https:\/\/blog.jetbrains.com\/phpstorm\/2014\/12\/developing-on-pantheon-with-phpstorm\/","title":{"rendered":"Developing on Pantheon with PhpStorm"},"content":{"rendered":"<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-pantheon.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-full wp-image-8354\" alt=\"GetPantheon.com Drupal and WordPress hosting\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-pantheon.png\" width=\"300\" height=\"100\" \/><\/a>Where do we host our applications? How do we deploy them? Can we have different environments like development, staging and production? A possible answer to all those questions is <a href=\"http:\/\/www.getpantheon.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Pantheon<\/a>. It\u00a0provides hosting, database, caching, version control, different environments, workflows for moving an application through the development pipeline and more. Let&#8217;s go over the basics of working on a Drupal or WordPress site hosted on Pantheon, using PhpStorm.<!--more--><\/p>\n<p>If you prefer watching a quick screencast instead of reading lots of text, here you go:<br \/>\nhttps:\/\/www.youtube.com\/watch?v=2K20B0cEC4g<\/p>\n<h2>Getting Started<\/h2>\n<p>Let&#8217;s assume <a href=\"http:\/\/helpdesk.getpantheon.com\/customer\/portal\/articles\/717236\" target=\"_blank\" rel=\"noopener\">a site has already been created on Pantheon<\/a>. We can work on the site&#8217;s sources in two ways:\u00a0<a href=\"http:\/\/helpdesk.getpantheon.com\/customer\/portal\/articles\/361247-starting-with-git\" rel=\"nofollow noopener\" target=\"_blank\">using Git<\/a>, developing locally and pushing changes to Pantheon once we want them to go live. The other way of working is <a href=\"http:\/\/helpdesk.getpantheon.com\/customer\/portal\/articles\/376107\" rel=\"nofollow noopener\" target=\"_blank\">using SFTP<\/a>\u00a0where we deploy our changes on the Pantheon servers directly, either manually or automatically. PhpStorm supports both modes, but for this blog post let&#8217;s stick with Git.<\/p>\n<p>Using\u00a0<b><em>VCS | Checkout from Version Control | Git<\/em><\/b>, we can enter our Pantheon&#8217;s Git repository details, which we can find on our site&#8217;s dashboard.<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-clone-git-repository-from-pantheon.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8355\" alt=\"Clone Git repository from Pantheon\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-clone-git-repository-from-pantheon.png\" width=\"608\" height=\"213\" \/><\/a><\/p>\n<p>After selecting the path to clone into, PhpStorm prompts for our Pantheon password and then clones the entire site to our system. After cloning the site&#8217;s sources,\u00a0PhpStorm will detect the framework we&#8217;re using and lets us enable support for\u00a0<a href=\"https:\/\/blog.jetbrains.com\/phpstorm\/2013\/07\/drupal-development-using-phpstorm\/\">Drupal<\/a>\u00a0or\u00a0<a href=\"https:\/\/blog.jetbrains.com\/phpstorm\/2014\/03\/wordpress-support-in-phpstorm-8-eap\/\">WordPress<\/a>.<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-drupal-wordpress-support.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8356\" alt=\"Drupal and WordPress support\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-drupal-wordpress-support.png\" width=\"538\" height=\"87\" \/><\/a><\/p>\n<p>Once enabled, we can start working on our application&#8217;s code!<\/p>\n<h2>Deploying Changes to Pantheon<\/h2>\n<p>After modifying our source code, for example working on a Drupal or WordPress plugin, we can commit our changes back to Pantheon&#8217;s servers.\u00a0Using the <b><em>Ctrl+K<\/em><\/b> keyboard shortcut (<b><em>CMD+K<\/em><\/b> on Mac OS X), PhpStorm lets us review the changes we made and add a description to the commit.<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-commit-changes-to-pantheon.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8357\" alt=\"Commit Changes to Pantheon\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-commit-changes-to-pantheon.png\" width=\"800\" height=\"656\" \/><\/a><\/p>\n<p>The\u00a0<em><strong>Commit and Push<\/strong><\/em><strong>\u00a0<\/strong>command uploads our changes and displays them on the Pantheon site dashboard. Changes are now live in our development site, and we can use <a href=\"http:\/\/helpdesk.getpantheon.com\/customer\/portal\/articles\/383609-using-the-pantheon-workflow\" target=\"_blank\" rel=\"noopener\">Pantheon&#8217;s workflows<\/a> to advance it to a testing environment, staging or production.<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-commit-log.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-8358\" alt=\"Pantheon Commit Log\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2014\/12\/phpstorm-commit-log.png\" width=\"705\" height=\"233\" \/><\/a><\/p>\n<h2>What else is there?<\/h2>\n<p>This blog post only covered the basics. We can do many more things, like working with the hosted database directly, database refactoring and code completion. Drush, Drupal&#8217;s command line too, can be used to perform actions related to our application and even Pantheon-specific actions <a href=\"https:\/\/www.getpantheon.com\/blog\/terminus-pantheon-cli\" target=\"_blank\" rel=\"noopener\">using Terminus<\/a>. A complete tutorial on\u00a0<a href=\"http:\/\/confluence.jetbrains.com\/display\/PhpStorm\/Developing+on+Pantheon+with+PhpStorm\" target=\"_blank\" rel=\"noopener\">developing a Drupal or WordPress application using Pantheon and PhpStorm<\/a> is available.<\/p>\n<p>Give it a go!\u00a0We would love to hear from you through\u00a0the\u00a0<a href=\"http:\/\/youtrack.jetbrains.com\/issues\/WI\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>, in the comments below, or in our\u00a0<a href=\"http:\/\/devnet.jetbrains.com\/community\/wi?view=discussions\" target=\"_blank\" rel=\"noopener\">forums<\/a>!<\/p>\n<p><em>Develop with pleasure!<br \/>\n<\/em><em>\u2013 JetBrains PhpStorm Team<\/em><\/p>\n","protected":false},"author":118,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[808,907],"tags":[1212,379,2340,190,45],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/19610"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/types\/phpstorm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/users\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/comments?post=19610"}],"version-history":[{"count":1,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/19610\/revisions"}],"predecessor-version":[{"id":432114,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/19610\/revisions\/432114"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/media?parent=19610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/categories?post=19610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/tags?post=19610"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/cross-post-tag?post=19610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}