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
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!
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
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
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