When building custom themes client sites it is important to test as many edge case as possible. Theme Unit Test Data is the way to go here and a minimum requirement for any professionally built WordPress theme (in my opinion anyway) If building a theme for the wordpress.org theme repository this will almost certainly be …Continue reading
wp-cli
Testing WordPress Plugins with WP-CLI and PHPUnit
Everyone agrees that extensive testing of WordPress plugins is necessary. The problem is that the tests we run as developers don’t take into consideration certain edge cases and rely on our experience to determine what needs to be tested. Testing is also time-consuming and quite frankly not very fun. Automated testing is recommended to ensure …Continue reading
Using WP-CLI for database synchronisation
There are a great many tools that duplicate sites and synchronise databases between sites. Some favourites are Duplicator, WP Migrate and WP Migrate Pro, as well as good old phpMyAdmin. However, sometimes all that is needed is to import the database and then do a search and replace. This is easier said than done however …Continue reading
WP-CLI Cheatsheet for site setup
For those who are comfortable with WP-CLI but haven’t yet memorised all the commands here are some of the more common ones I use when developing client sites. The object here is to save time and to avoid do repetitive (and unexciting) tasks in wp-admin. If you aren’t comfortable with WP-CLI and would like to …Continue reading
Up and running with WP-CLI
This isn’t a tutorial about installing WP-CLI but if you want one I recommend this one. Let’s compare two ways of downloading WordPress and creating the database. Without WP-CLI This is the fastest way I’ve managed to install WordPress on my local server before WP-CLI: 1. Create the database. mysql -u [username] -p[password] -e “create …Continue reading