Manage wordpress blog on remote server via git

I want to be able to develop my plugins & themes on my machine and the changes be reflected on my server almost instantly. Also I want a backup plan. So git & github seems a very good solution. I want to make regular changes to the server (push from local) and once in a while upload them on github too (local to github or remote to github).

The question is can I clone the repo from github to my remote server and to my local machine and be able to push from local to remote or pull from github to remote (if I’m not at home)?

Read More

Edit: I did a research and I found out that I actually need a bare repo in the server, but i want it to be able to push/pull to/from github.

Related posts

Leave a Reply

1 comment

  1. In github and bitbucket (https://bitbucket.org) you can add any number of ssh keys from different machines and push and pull from anywhere you want. The command to generate such a key is

    ssh-keygen 
    

    answer the questions with enter and the ssh key will be in /home/user/.ssh/id_rsa.pub. You have to do this for every machine you want to push and when the repository is set to private, yo also have to do it for those machines, you want to pull from.

    So the workflow would be

    • editing locally
    • pushing to github/butbucket repo: git push -u origin
    • log in to the machine where wordpress is running: git pull