Get Version Controlled
If you’re not comfortable with git yet, I highly recommend you get up and running with it. There are tons of great tutorials out there. The one I used can be found here. It’s a 70 min video but is very good at explaining how git works.
What files should I version control?
Here is a gist I yanked from github that is everything you need to know about version controlling WordPress.
*.log .htaccess sitemap.xml sitemap.xml.gz wp-config.php wp-content/advanced-cache.php wp-content/backup-db/ wp-content/backups/ wp-content/blogs.dir/ wp-content/cache/ wp-content/upgrade/ wp-content/uploads/ wp-content/wp-cache-config.php
If you find a different/better WordPress .gitignore, let me know in the comments.
This gist has saved me a lot of time of fiddling with different .gitignore configurations.
I use MAMP when I’m at work on a Mac and XAMPP when I’m home on a PC. They both achieve the same goal. I can work locally on my WordPress site. I can tinker with PHP and test without worrying about bringing down my production server or bogging it down.
Local configuration vs. production configuration
Now, chances are, the settings within your wp-config.php file will be different on your local server than your production server. There are multiple ways to handle this.
The way I use was posted by Mark Jaquith on his blog. It’s a clever way of dealing with the local vs production dilemma that all WordPress devs have encountered at least once.
Another quite good reference point on the matter is this article, which takes into account version control as well.
Use Node.js & Grunt
If you want to completely supercharge your WordPress workflow, look into using Node.js and Grunt to run repetitive tasks. I might write my own article on this eventually, but until then I would highly recommend looking at an article by Matt Banks about WordPress development and deployment with Grunt.