Today’s guest blog post was written by Isaac Castillo. Isaac is the founder of Echo Design Solutions, a San Antonio-based WordPress and WooCommerce development company. We asked Isaac to share his approach to WordPress development with our readers. We hope you find his insights helpful.
WordPress is a highly-flexible, robust content management system, making it a great choice for nearly any web development project. One of the most common challenges faced by developers is finding a workflow that allows for rapid, consistent results, and the same is true for WordPress developers. A good WordPress development workflow can streamline the development process and help you avoid common errors.
There are many different tools available for WordPress development and equally as many approaches. I’m still improving my own workflow, and I’m sure that I’ll continue to do so in perpetuity. Today, I’m sharing my current WordPress development workflow in the hope that it will help you get started on your own WordPress projects.
The first step in my WordPress development workflow is setting up a local development environment. For this, my team and I use Homestead, a LAMP-based virtual machine provided by Laravel. We began using Homestead for Laravel projects. It’s rock-solid and has everything required for WordPress development, so we decided to use it for our WordPress projects as well. I recommend you read my approach to setting up Homestead for WordPress in this blog post.
Once I’ve set up a Homestead machine for WordPress development, I start by installing our team’s own custom theme. Our theme was developed based on bootstrap for mobile development, Sass for CSS compiling and gulp, which allows us to use ES6 syntax. This theme is actively being development and will undergo more changes in the near future.
My team also has a starting point for generic custom post types in our repo. We use this to launch our plugin development projects.
Versioning With Git
Versioning is a habit that I practice with my team, and one that I recommend you employ on your own WordPress development projects. Git and GitHub can make it much easier to work in a team environment.
Our team is continually improving our approach to versioning with Git. It’s important to have every team member working in their own branch as this allows each branch to be pulled into a master branch. This master branch will then serve as the final code, and will be deployed to your web host.
Once we’ve completed local development, my team moves on to deploying code to the production server. This process is constantly changing, so I’m always looking for ways to improve our approach.
Your approach to deploying code will depend on the capabilities and permissions of your web host. Consider the following:
- Do you have SSH access?
- How can you migrate the site’s database?
- How will you copy the site’s files onto the server?
Once you’ve answered these questions, you can structure your workflow for deploying WordPress sites.
If you have SSH access to your web server, you can use WP-CLI to make it easier to perform common tasks, like installing WordPress. Another tool that I recommend is Wordmove, which supports FTP, though that feature may eventually be deprecated. The coolest thing about both of these tools is that they make it easier to migrate a WordPress database, which is the most challenging part of deploying WordPress sites.
Next, I update the database to match production and then pull the most recent code from Github. This allows me to accounts for any recent changes that have been made to the site’s code. Finally, I push the code up to be reviewed and merged into the final master branch that will be pushed to the production server.
There are still a few challenges to address in my WordPress development workflow, the first of which is making sure that everyone on the team is on the same page. Hand-in-hand with that concern is ensuring that project flow guidelines are spelled out precisely so that every team member understand how our workflow should work. We’re constantly looking for ways to improve our workflow, particularly the deployment portion.
I’d love to hear your feedback on my team’s WordPress development workflow. As I mentioned earlier, there are several ways to approach WordPress development, and this means that there are tons of good tips out there. What’s your preferred workflow for developing WordPress sites?