Developing WordPress websites on your own is relatively easy; the room for error is you. Even if you’re not using version control and do everything online with a (s)ftp connection, if there’s an error you just re-trace your steps and find where you took a wrong turn. But development in teams gets a lot more difficult. Everybody has a different coding-style and everybody will be working on different parts of a project. The big thing is to keep code maintainable and to streamline workflow.
If you’re just a single developer right now, pay attention; you might be getting into a team-situation soon and getting used to this stuff can only help you.
1. Use Version Control.
The value of your entire team using version control on the codebase can’t be overstated. Without version control you’d need at least one person full-time tying everybody’s code together and figuring out if and where it breaks; there’s just no sustainable solution without version control.
So this entry might come to a lot of you as a no-brainer; who would start a group-project without using version control? Well, most full-fledged developers would agree with you, but according to a Survey done by Smashing Magazine 45% of WordPress developers still don’t use version control in their projects. If you’re a single / freelance developer, you should learn some kind of version control as soon as possible. Not only will it make your life easier, it will change the way you work. And eventually, when you get to be part of a team, you will fit right in.
According to this graph and my personal opinion, you’re best off using GIT. Mercurial is also nice, but Subversion is starting to show it’s age. The easiest way to get started with git is to follow this 15 minute mini-course on Github.
Here are some more resources:
- Git training by Git Immersion
- Githug; a nice command-line game that’ll teach you Git in the process
- A great YouTube playlist filled with step-by-step instructions specifically for using Git with WordPress
Without some type of version control keeping a code-base clean and bug-free is almost impossible… so get crackin’ you 45% percent.
2. Automate Deployment.
According to the same study by Smashing Magazine a whopping 49 percent of the WordPress developers still use FTP for deployment. First of all; if you are going to work that way, please use SFTP… this will make sure that -whoever is watching you transfer files to a server- isn’t able to view the log-in credentials in a simple network-log. And second; this is again something you can’t really start doing in a team.
Just like the version-control issue, allowing manual deployment will leave your codebase vulnerable to errors and merge-conflicts. It also means shutting down a site for a few minutes while the new files are being transferred. This might not sound like a big deal, but if you get to the more densely traffic-websites you’re going to make a lot of people unhappy.
Automated deployment is usually tied to version control software. It’ll use the latest stable build (or whatever tag or version you specify) and uploads that version to a production or staging server. For WordPress, deploying with Capistrano and WP Stack is a very good option. Here are some resources:
- WP Stack, a professional WordPress deployment tool
- Deploying WordPress with Capistrano and WP CLI
- Arnoud Sellenet created his own workflow with WP CLI, which is awesome.
Anybody in the team can deploy, as long as everybody is using the same workflow to do it.
3. Vagrant Up, Baby!
Vagrant is a rising star in almost any webdevelopment community. And that’s because it’s a great tool for developing in teams. Vagrant gives you the ability to create lightweight and instant develop-environments through code. This means that everybody on your team can work on the same type of server, with the same type of tools, just by typing Vagrant Up.
Vagrant single-handedly puts an end to the “it works on MY machine”-argument, since everybody’s development environment can be the same. It’s easy to set up and each development environment you create you can also put under version control, so your team is always going to be on the same page, even if a specific developer needs a specific package to get stuff going.
The best thing about Vagrant is that it can accomodate ANY workflow you’d like. If you like to work with Apache, you can include it, but if you’d like to work in Nginx, you can do that as well. You can pick any type of version control you want and you can include stuff like grunt.js to streamline frontend work.
- Setting up Vagrant
- Varying Vagrant Vagrants – An advanced and extensive WordPress development environment
- VagrantPress is a simpler, lightweight alternative to VVV
There are a lot of tools available to make WordPress development in teams easier. Wether you are working in a team right now or working as a solitary freelancer, i’d recommend checking these tools out if you haven’t done so already. Automation is your friend :). If you have any questions or suggestions, i’d love to read them in the comments!
If you enjoyed this post, make sure to subscribe to WP Mayor’s RSS feed.