WP-CLI is a powerful command-line tool for managing WordPress. Unfortunately, most of the information on the Internet on how to install it …
Blog
Get an array of variation IDs for a WooCommerce product
If you need variation IDs for a WooCommerce product and you know the WC product ID, you can use one of the two following code snippets to …
Check and delete orphaned post meta in WordPress
Through the natural course of managing a WordPress site and its database, you may end up with some orphaned post meta. This is especially …
Block an IP address from accessing your site
Generally, you can use your .htaccess file to block access to your site from certain IP addresses. This can be an effective method of …
Using WordPress Debug Constants
Here are some constants you can define in your wp-config.php file to assist with debugging. Note that debugging should not be enabled on …
Save WordPress debug log by date
It's not recommended to keep debugging enabled on a production site. But sometimes you may need to in order to gain the data you …
Utility function for the WordPress error log
There is function for writing information to the WP error log file - error_log(). The problem is that the function doesn't handle arrays …
How to Create a Site Specific Plugin
A common question I get when supporting WordPress users is "where to I put this custom code snippet." A frequent and simple answer to …
Don’t Use do_shortcode()
The Internet abounds with examples of bad practices in WordPress development. Using do_shortcode() unnecessarily is one of the most …