Getting template_include to work when allow_url_include is off?

Wouldn’t ya know – 10 minutes or less since I asked my question and I’ve discovered the answer. I was attempting to define MY_PLUGIN_TEMPLATES using using plugins_dir_url(), now it looks like this and is working: define( ‘MY_PLUGIN_TEMPLATES’, dirname( __FILE__ ) . ‘/templates’ ); Thanks to mfields for the suggestion of dirname instead of WP_PLUGIN_DIR.

Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)

You’re looking at the problem the wrong way. The error you’re seeing isn’t an error coming from WordPress, it’s a PHP error. Somehow, somewhere, something is limiting the memory limit to 96M, and it ain’t WordPress that’s doing it. Here’s the thing: WordPress can’t actually limit the memory on most servers. I know that it … Read more

Get WP CLI to hide debug warnings and notices in JSON output, same setting as website

A quick manual solution is to direct all error output to a log file somewhere or even to /dev/null. With your command this would look like this: wp plugin list –fields=name,status,update,version,update_version,title –format=json 2> ./cli-command.err.log If you totally don’t care about the errors, warnings and notices, you could send it to /dev/null like this: wp plugin … Read more

Max file size not updating

1] To do this, change the upload_max_filesize and post_max_size directives in your php.ini file. To ensure that file uploads work correctly, the post_max_size directive should be a little larger than the upload_max_filesize. For example, the following settings demonstrate how to set a file upload limit to 20 megabytes: upload_max_filesize = 20M post_max_size = 21M 2] … Read more

Connection lost. Saving has been disabled… (Updating Posts/Pages)

That message is a result of your server throwing a 503 error and the WordPress Heartbeat API catching that error. See https://core.trac.wordpress.org/ticket/25660 for the background on the fix that WordPress introduced to save offline edits. Things to check on your computer are if WAMP is actually running when you’re getting this message (check the status … Read more

Which one does WordPress prioritize when it comes to php.ini, wp-config and .htaccess?

It’s not clear from your question what you are changing in each of these files, but I presume in each case it is the upload_max_filesize PHP setting. In general, settings will be applied in this order, each over-riding the previous value: php.ini Apache directives in .htaccess calls to ini_set() However, this setting is defined as … Read more