{"action":"created","issue":{"url":"https://api.github.com/repos/pantheon-systems/documentation/issues/1446","repository_url":"https://api.github.com/repos/pantheon-systems/documentation","labels_url":"https://api.github.com/repos/pantheon-systems/documentation/issues/1446/labels{/name}","comments_url":"https://api.github.com/repos/pantheon-systems/documentation/issues/1446/comments","events_url":"https://api.github.com/repos/pantheon-systems/documentation/issues/1446/events","html_url":"https://github.com/pantheon-systems/documentation/issues/1446","id":141053382,"number":1446,"title":"New Doc Proposal: Creating Symbolic Links from code directories to files","user":{"login":"bmackinney","id":646061,"avatar_url":"https://avatars.githubusercontent.com/u/646061?v=3","gravatar_id":"","url":"https://api.github.com/users/bmackinney","html_url":"https://github.com/bmackinney","followers_url":"https://api.github.com/users/bmackinney/followers","following_url":"https://api.github.com/users/bmackinney/following{/other_user}","gists_url":"https://api.github.com/users/bmackinney/gists{/gist_id}","starred_url":"https://api.github.com/users/bmackinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmackinney/subscriptions","organizations_url":"https://api.github.com/users/bmackinney/orgs","repos_url":"https://api.github.com/users/bmackinney/repos","events_url":"https://api.github.com/users/bmackinney/events{/privacy}","received_events_url":"https://api.github.com/users/bmackinney/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pantheon-systems/documentation/labels/review","name":"review","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"nataliejeremy","id":9138609,"avatar_url":"https://avatars.githubusercontent.com/u/9138609?v=3","gravatar_id":"","url":"https://api.github.com/users/nataliejeremy","html_url":"https://github.com/nataliejeremy","followers_url":"https://api.github.com/users/nataliejeremy/followers","following_url":"https://api.github.com/users/nataliejeremy/following{/other_user}","gists_url":"https://api.github.com/users/nataliejeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/nataliejeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nataliejeremy/subscriptions","organizations_url":"https://api.github.com/users/nataliejeremy/orgs","repos_url":"https://api.github.com/users/nataliejeremy/repos","events_url":"https://api.github.com/users/nataliejeremy/events{/privacy}","received_events_url":"https://api.github.com/users/nataliejeremy/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-15T18:02:12Z","updated_at":"2016-03-23T17:04:36Z","closed_at":null,"body":"## Symbolic Links from Code Directories to Files\r\n\r\n## Description\r\nSometimes plugins expect for the code directory to have write permissions. This works on Dev, but not in Test/Live. \r\n\r\n## Outline\r\n\r\n1. change your dev environment code from SFTP to Git mode. If you do not have Git installed locally, you'll need to follow instructions here: https://pantheon.io/docs/articles/local/starting-with-git/\r\n\r\n2. In your local terminal, cd to the site code repository, make a copy of the writeable directory, and delete it from the code repository. \r\n\r\n3. Create, commit, and push the symlink to Pantheon.\r\n```\r\nln -s ./wp-content/uploads/new-directory ./wp-content/path/plugin-expects-to-write-to\r\ngit add .\r\n```\r\nAt this point, run `git status` and you should see the symlink in green and all of the language files in red.\r\n\r\n4. Commit your change and push to Pantheon\r\n\r\n```\r\ngit commit -m \"create symlink to writeable directory\"\r\ngit push origin master\r\n```\r\n\r\n5. Your symlink will then exist on the Dev environment, and when the plugin creates the files, it should continue to work, even with the Dev environment in Git mode. In your previous configuration, the plugin would fail while in git mode. You should not see the newly created files in the dashboard, as \"ready to commit.\"\r\n\r\n6. Deploy your code changes to Test and test them there\r\n\r\n7. Deploy your code changes to Live and create the files again there. (You can upload the files you preserved in step 2 to the Live environment's @`/wp-content/uploads/new-directory` directory via SFTP prior to deploying, if you do not want the Live environment to have to recreate them)\r\n\r\nHere's a nice resource you can use for creating symbolic links on Mac/Linux. http://apple.stackexchange.com/questions/115646/how-can-i-create-a-symbolic-link-in-terminal"},"comment":{"url":"https://api.github.com/repos/pantheon-systems/documentation/issues/comments/200443970","html_url":"https://github.com/pantheon-systems/documentation/issues/1446#issuecomment-200443970","issue_url":"https://api.github.com/repos/pantheon-systems/documentation/issues/1446","id":200443970,"user":{"login":"rachelwhitton","id":10119525,"avatar_url":"https://avatars.githubusercontent.com/u/10119525?v=3","gravatar_id":"","url":"https://api.github.com/users/rachelwhitton","html_url":"https://github.com/rachelwhitton","followers_url":"https://api.github.com/users/rachelwhitton/followers","following_url":"https://api.github.com/users/rachelwhitton/following{/other_user}","gists_url":"https://api.github.com/users/rachelwhitton/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelwhitton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelwhitton/subscriptions","organizations_url":"https://api.github.com/users/rachelwhitton/orgs","repos_url":"https://api.github.com/users/rachelwhitton/repos","events_url":"https://api.github.com/users/rachelwhitton/events{/privacy}","received_events_url":"https://api.github.com/users/rachelwhitton/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T17:04:36Z","updated_at":"2016-03-23T17:04:36Z","body":"I like that! Good plan @bmackinney +1 "}}