I’ve been updating several of my themes to support the new custom logo feature that is being introduced in WordPress 4.5 (read about it here).
Most of my themes already had a logo option, so part of adding support for this new feature has been to build an update script to migrate the previously saved value (generally saved to the theme mod “logo”), to the new theme mod “custom_logo”.
I assume a lot of other theme authors will also be doing this, so I’m sharing my update code in case it can save someone a few minutes. Continue reading
I’ve started using DeployBot to manage a lot of my code deployments. It works great if you develop custom themes for clients and keep your repositories in hosted version control (like GitHub or BitBucket).
I generally work in a “staging” branch (when I’m working solo), which auto-deploys to the staging environment. I trigger deploys to production with commit messages to the master branch, i.e. “Version 1.2.2 [deploy production]”.
One really nice feature Deploybot added recently is the ability to run build tasks on a cloud server before transferring via SFTP to the final destination. This means you can keep generated assets (sass files, minified js) out of your git repos, which keeps the committed changesets cleaner and avoids generated code conflicts when working with teams.
The only issue I had when using build tasks with deployments was this occasional error “DeployBot failed to establish or maintain connection to your server.” I found if I added “rm -rf node_modules” as the last step in the build, that resolved the issue. It also sped up the deploy and kept those files off the destination server.
If you’re interested in how other WordPress agencies/freelancers use Deploybot, this post highlighting Reaktiv is also a nice resource.