Things change rapidly in the WordPress world. The content in this post is more than a year old and may no longer represent best practices.
General Q & A
Weirdness
Watch out for hosts that automatically delete BackupBuddy plugin files. Sallie ran into an issue recently where DirectNIC deleted the PCLzip from BackupBuddy, so it wouldn’t run. After watching the file disappear when she uploaded the plugin via FTP, she had to remove BackupBuddy and install a different plugin–in this case, UpdraftPlus for backup to Amazon S3.
Backup Solutions
Eve Lurie mentioned she’d had some issues with BackupBuddy recently. (They have gone through a flurry of upgrades, but two problems I had using BackupBuddy recently turned out not to be problems with BackupBuddy itself: one was an .htaccess issue caused by a host that needed a PHP handler to tell it to use PHP 5, and another was caused by a database that had a whole duplicate set of WordPress tables.) She wanted suggestions for alternative backup options.
If you have a cPanel host, you can always back up either your whole site or your database from cPanel. Not all levels of hosting will let you schedule that, however, and the backups don’t automatically go offsite. Ed Ehrgott recommends rsync.net, a hosted service that uses rsync to back up your site and then stores the backups in the cloud. There are no one-click restores, however.
WordPress 3.8
Anca asked how many people had upgraded and whether they’d had any problems. Some people mentioned that they were holding off upgrading primarily because they were concerned that the changes to the administrative interface would confuse their clients. (Apparently there’s a plugin to make the new 3.8 admin look like the old 3.7 admin if you want it to.)
Creating a Development Environment
Julian Medina asked about creating a development environment. What plugins are helpful? Should you develop locally? Yes, you should absolutely develop locally, though it also helps to have a staging site on the same host the client uses, because some things operate differently on a production server, and also to test things like Jetpack. Anca recommends Debug Bar and the Developer plugin, which asks you what kind of developer you are and then tells you which plugins you need to install.
Searching Multiple Categories
Anca is looking for a plugin that will search multiple categories. The one she used to use doesn’t work with the current version of WordPress. Sallie later found two tutorials with some relevance, Mixed Relationship Taxonomy Queries by Helen Hou-Sandi and How to Add an Advanced Search to Your WordPress Site by Craig Buckler, but so far no equivalent plugin.
How Do You Choose Plugins?
Shar asks what people think about the plugins from WPMU DEV, which brings up the larger question of how to choose plugins.
Here were some suggestions:
- Ask the developer a question. Does s/he answer?
- How recently has it been updated?
- What’s the support history?
- Surgical—single-purpose (There’s less overhead, especially if you only want it to do one thing)
- Can you understand the basic structure of the code?
Some Favorite Plugins
- Advanced Custom Fields
- Gravity Forms
- Posts 2 Posts
- Redirection
- The Events Calendar Pro
- Rewrite Rules Inspector
- WP Migrate DB (also WP Migrate DB Pro)
Version Control with Ed Ehrgott of Tall Blade Development
Why do you WordPress developers need version control? Because if you go commando and edit on a production site, whether through the theme/plugin editor or via FTP, at some point you are going to screw up and break the site. With everyone watching.
Manual version control–by renaming old versions of files–gets clunky and confusing after a couple of revisions, and doesn’t work well if more than one person is involved in the project.
Version control systems (a.k.a. source code management systems) started with RCS for GNU in the 1980s. CVS was popular for some time but has not been under active development since 2008. Some of today’s popular free version control tools include Mercurial, Subversion, and Git. There are also many commercial version control systems such as Perforce.
Git is very popular among WordPress developers, possibly because of GitHub, but the WordPress core, theme, and plugin repositories are all maintained in Subversion. The WordPress Codex has a page about Installing & Updating WordPress with Subversion that contains a footnote for the people who prefer to use Git–they created a mirror on GitHub. Git has certain vulnerabilities and also certain workflow issues which sometimes make Subversion a better choice; you’d have to ask the WordPress core team precisely why they chose Subversion over Git, because I don’t know.
Note that version control is not the same thing as backup. Version control is meant to track and manage changes you make to your code, the way Microsoft Word’s Track Changes feature tracks changes you (and others) make to your documents, or WordPress’ own post revisions track changes you make to your content. You’ll still need to back up your WordPress files and database. You can do that from your control panel or with a backup plugin. (See previous discussion of backup.)
Useful Tools for Version Control
- Sublime Text 2 (Text and code editor for Mac and PC)
- PhpStorm IDE by JetBrains
- Source Tree front end for Git & Mercurial (Mac and PC)
- Codebase Git, Mercurial, & Subversion hosting
- Deploy code deployment platform (supports Git, Mercurial, Subversion)
More Presentations about Version Control in WordPress
Paul Tela: Keeping WordPress under (Version) Control with Git (WordCamp Columbus 2013)
Aaron Holbrook: An Introduction to WP and Version Control
Slides and Video embedded in Torquemag.io article by John Saddington.
Leave a Reply