WordPress: How to “properly” allow unfiltered uploads

June 10, 2019

If you are working with a WordPress site and getting the dreaded “Sorry, this file type is not permitted for security reasons.” message, fret no more! WordPress has a config that allows you to enable unfiltered uploads define( ‘ALLOW_UNFILTERED_UPLOADS’, true ); This, however, does not always work. Especially on Multisite, which may only allow unfiltered

Canonical URL plugin for WordPress released!

August 31, 2018

Have you run into this scenario? You have content that needs to live on multiple sites but you are concerned about SEO issues duplicating said content? As search engines crawl the web looking for pages to include in their search indexes they may run across content duplicated from another site. When that happens the search

Find total number of post records on a WordPress Multisite in MySQL

August 3, 2018

I was recently asked for the total number of posts on a WordPress website. Normally as simple as looking at the number in the dashboard, however in this instance the WordPress install was a Multisite with nearly 100 sites. That would have taken far too long to do manually, but what about having MySQL do

Run a wp-cli command across the network

April 16, 2018

Need to run a wp-cli command across a network of WordPress sites? Here is an example of how to add/update an option on every site on the network using wp-cli. wp site list –field=url | xargs -n1 -I % wp –url=% option update my_option my_value This is really two commands in one. Lets break them

Find and update WordPress posts with comments older than NNN days

March 12, 2018

I have a use case where I need to disable comments on posts in WordPress where the last comment was more than one year, or 365 days, ago. Posts can be found with this query: SELECT p.ID, p.post_title, p.post_date, p.comment_status, p.`ping_status` FROM wp_posts AS p WHERE p.ID IN ( SELECT c.comment_post_ID FROM wp_comments AS c