How to fix a WordPress HTTPS redirect loop with an NGINX reverse proxy

September 16, 2019

If your WordPress site is set up to use HTTPS and a reverse proxy, such as an NGINX reverse proxy, is put in front of it you may wind up with an infinite redirect loop. Following the redirect in dev tools, it looks like this is happening: https://example.com -> https://example.com A head scratcher for sure,

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

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