• Hi everyone,

    Let me first give you a little back story (skip this paragraph if uninterested). I have had a blog running for the pst 2 years. It has grown into a 600 post monster so naturally I am VERY afraid to do ANYTHING that might break it. Nothing has been updated since then because many people have told me updating even a plugin could cause problems. So yes, theme, plugins and wordpress are all 2 years old. I purchased backupbuddy to feel “safe” in case anything happens. I recently installed WAMP on my pc and brought in backup from backupbuddy to play with locally and have the live one be untouched while i try to update things and make a few changes.

    For the first time I am working locally with WAMP. Having worked for the last 2 years directly on the server I now see how much more comfortable/fast it is to work locally.

    I believe people work locally and then push those changes live? I am wondering if this is something I can keep as an ongoing workflow? By this I mean can I work locally from now on and just push changes every time I update?

    thanks

    Alex

Viewing 5 replies - 1 through 5 (of 5 total)
  • Will Brubaker

    (@willthewebmechanic)

    Automattic Happiness Engineer

    Howdy Alex,

    It’s entirely possible, but how you do it will depend on several factors. My own workflow goes something like this:

    1) create a central git repository somewhere that will be accessible from both your local machine and your hosting account . This repo will track ALL changes to my wp-content folder.

    2) make whatever changes to plugins, themes, etc – commit those changes to the local copy of the repo, push those changes to the central/master repository.

    3) from the live site, pull the changes in.

    Life will be far easier if your hosting environment provides some sort of command line access, but if they don’t I reckon there might be a plugin solution.

    Thread Starter avillabon

    (@avillabon)

    Hmm interesting. I don’t really know what a git repository is… but i can google it and get an idea.

    Let me understand this. Whatever changes I make will be made immediatelly (like dropbox would) or do i have the option to “push” them to the live server once everything is working? I think the answer is yes.

    It would look something like this (right?):
    local copy -> repo copy -> live site

    As for the command line access I have godaddy as my host, not sure if they provide it. What would i need it for? I am not a programmer.

    Thanks for your help! Very curious to see what other people are doing.

    Alex

    Will Brubaker

    (@willthewebmechanic)

    Automattic Happiness Engineer

    Let me understand this. Whatever changes I make will be made immediatelly (like dropbox would) or do i have the option to “push” them to the live server once everything is working? I think the answer is yes.

    In my example, the answer is no, that’s not how it works, but the possibilities are limitless, really.

    So, git is a version control system and is the one currently favored by all of the cool kids. I’m not asserting that it’s the best solution for your case, but it is how myself and many other folks handle development/staging/live deployments.

    Google tells me that command line access is available on godaddy…I would have never guessed: Using SSH to Connect to Your Linux Shared Hosting Account

    And here’s what turned up for me on google about git/WordPress workflow, I hope it helps: This Is How We Version Control and Deploy Our WordPress Websites with Git

    Should be possible to set up a shell script to automate the process of pushing to git repo locally, and having the changes pulled on your remote server, with having the server rebooted.

    @avillabon

    I believe this is how most professional web developers work, since it is simply not a good idea to implement changes on your live site that can affect the user experience and sites with a lot of traffic can not afford to have something going wrong during development, specially when it comes to big changes like templates or plugins.

    As you accurately point out, such changes can mess up your site if there are compatibility or other issues, but it is simply a good idea to run with the latest versions of wp and plugins because of bug fixes and support.

    I would think that for writing articles, you should be safe for the most part, posting directly on live site, however it seems a good idea to work on dev site and then deploy the changes just in case, however, your real issue is the other updates: wordpress and plugins. If you want to work on that, a staging site might be the best way to go about it. The process, though, is not straightforward or simple or clear. Since you are starting with git, I recommend you get familiar with how version control works and figure out what is the best platform for you, I like BitBucket because you can have private repositories for free, unlike Github.

    Then, you need to use another tool to deploy changes to your live server, FTPloy and Diploy.io are 2 of the tools people use, they connect to your git repository and push the changes to your site.

    Anyway, in doing this, I tried different versions of every tool available and ran into many unexpected errors, which is just part of the process, but at the end, figuring this out will take you to the next level as a wp user.

    I wish I had tested a plugin to be able to recommend one, but I haven’t, I decided to do it the old fashioned way and it’s better for learning how things actually work.

    In short: a staging environment is a great idea and protects you from major site crashes, but it’s not super easy, it takes time and you have to understand the basics or WordPress structure in order to do it well.

    Best!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Working locally and pushing to remote server’ is closed to new replies.