As web designers/developers we are always trying to find better techniques to develop and deploy websites. There are many great ways to take a website from local development to live on the web. I think that I have tried them all. This post will explain my success fro website development.
Git and Bitbucket/Github
One of the first tools I started using to make development/deployment easier was Git. If you haven’t started using Git you are really missing out! IT IS AWESOME!!
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows. via Git-Scm.com
Some of the places to store your code before deploying your website are Bitbucket or Github. These places are great because you don’t have to worry when something happening to your computer and you losing your work. When you push your code to one of these websites, it is permanent and you can pull it down later if you lose some work.
Dandelion Deployment System
Dandelion is an Incremental Git repository deployment system. It takes the second approach but manages revisions for you so there’s no need to manually track changed files- Git does this anyway and Dandelion leverages that. Dandelion keeps track of the currently deployed revision so that it may later be used to generate a list of files that have been changed, added or deleted and transfer those files via FTP or SFTP. After I have all my code ready for deployment it is time to set up dandelion.yml on your computer. Requirements:
After you have both of the above installed it is time to set up Dandelion. First you need to install dandelion
$ gem install dandelion
After you have run the gem and have dandelion installed it is time to set up the dandelion.yml file. This file will be placed in the root of your of the Git repository you wish to deploy. Configuration of dandelion.yml:
Then start deploying by running the command below.
$ dandelion deploy
This will deploy the local HEADrevision to the location specified in the config file. Dandelion keeps track of the currently deployed revision so that only files which have been added/changed/deleted need to be transferred.
WP Migrate DB
WP Migrate DB is a wordpress plugin that exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer. It is perfect for developers who need to update their local install with fresh data from the production site, or copy their locally developed site to a staging or production server. This plugin has a free and paid version of the plugin.
There are many ways to deploy your websites to a live server from your local environment. This is just my personal way of doing it. This is the easy way that I have found to do deployments. If you have any suggestions on way to improve it let me know.