wordpress meetup milano 23:04:13
DESCRIPTION
TRANSCRIPT
![Page 1: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/1.jpg)
How to develop with no ftp and without freaking out
martedì 23 aprile 13
![Page 2: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/2.jpg)
FTP Alternatives
• Direct Server editing
• SFTP
• GIT
• Magic Dust
martedì 23 aprile 13
![Page 3: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/3.jpg)
FTP Alternatives
Direct Server Editing and SFTP not covered here... suitable for single server environments
martedì 23 aprile 13
![Page 4: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/4.jpg)
GIT
WTF?
martedì 23 aprile 13
![Page 5: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/5.jpg)
GIT - 1
- Simple and effective way to keep track of changes on files- Distributed- Very Popular -> Integrated in your OS, many clients
martedì 23 aprile 13
![Page 6: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/6.jpg)
GIT - 2GIT is the ideal solution to manage a multi-tiers, multi-environments, multi-developers project
Last commit changes
Last commits
martedì 23 aprile 13
![Page 7: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/7.jpg)
GIT - 3
This GIT is very Coooool!But, Wait, What...
DO I HAVE TO COMMIT EVERYTIME I WANT TO SEE A CHANGES IN THE CODE?
martedì 23 aprile 13
![Page 8: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/8.jpg)
The “Magic Dust” Solution
+
martedì 23 aprile 13
![Page 9: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/9.jpg)
The “Magic Dust” Solution
Open a Terminal (If you use Windows, I’m sorry for you)
> cd ~/Dropbox (ops .... :D)> mkdir live-ilmiosupersito.com> cd live-ilmiosupersito.com && git init> upload you first index.html (or the entire WordPress latest.zip here)
martedì 23 aprile 13
![Page 10: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/10.jpg)
> cd ~/Dropbox/live-supersito.com> save the changes: git add . && git commit -m ‘first version of the site’ > upload to github
git remote add origin [email protected]:mindgap/elasticdot-corporate.gitgit push origin master
The “Magic Dust” Solution -1
martedì 23 aprile 13
![Page 11: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/11.jpg)
Want to test out some changes?
> cp -R ~/Dropbox/live-supersito.com ~/Dropbox/test-supersito.com> cd ~/Dropbox/test-supersito.com> git branch test && git checkout test
The“Magic Dust” Solution -2
martedì 23 aprile 13
![Page 12: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/12.jpg)
You can now develop on both version of the site:
1. ~/Dropbox/test-ilmiosupersito.com for the test environment2. ~/Dropbox/live-ilmiosupersito.com for the production environment
Point to these paths your browser or webserver
The“Magic Dust” Solution -3
martedì 23 aprile 13
![Page 13: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/13.jpg)
Ah, uhm, so you want to put the test changes on live?PUSH your changes to github
> cd ~/Dropbox/test-supersito.com> git add . && git commit -m ‘new cool theme’ && git push origin test
PUT THEM in PRODUCTION> cd ~/Dropbox/test-supersito.com> git checkout master> git merge test && git push
> git ~/Dropbox/live-supersito.com> git pull
DONE!
The“Magic Dust” Solution -4
martedì 23 aprile 13
![Page 14: WordPress MeetUp Milano 23:04:13](https://reader035.vdocuments.net/reader035/viewer/2022081907/545918e3b1af9fba5d8b4f3a/html5/thumbnails/14.jpg)
Using GIT is a MUST, but by using Dropbox in the middle you can:
- Work locally on your computer
- Have a fresh copy of the code on your server as soon as you merge
- Have always a backup and the history of the changes
Conclusion
martedì 23 aprile 13