Ignore spaces when group MySQL query results

Let's get a list of all duplicate postcodes (could be any string of course) out of a specific field in the database. This could be handled in PHP but, with a decently spec'd server especially, it's quicker to handle it in the database. The basic query looks like this: (this example is from WordPress but …

Extending WP CLI – wp config update

One gap in the abilities of WP CLI at the moment is the ability to modify an already existing wp-config.php file. v1.2 introduced the –force flag to overwrite an existing one, but that is the sledgehammer option – so I started working on it myself. I have put a very initial version on GitHub and …

Displaying you WordPress.org favourite plugins

On a whim this May bank holiday, tucked up on the sofa watching movies, I decided to create a plugin to display my favourited plugins on WordPress.org. After a bit of digging I found you can use the plugins_api() function and pass it a username, e.g.: plugins_api( ‘query_plugins’, array( ‘user’ => emirpprime, ‘per_page’ => ‘-1’ …