Skip to content

Instantly share code, notes, and snippets.

@nickdavis
Created January 15, 2017 20:46
Show Gist options
  • Save nickdavis/e1de11704680744fec083be0fa2ddf17 to your computer and use it in GitHub Desktop.
Save nickdavis/e1de11704680744fec083be0fa2ddf17 to your computer and use it in GitHub Desktop.
Disable WP Engine 'forced' https (SSL) redirection / AJAX breaking on non https site (WP Engine Support said it is a known issue happening on a few random installs). To install place in your mu-plugins folder (and, of course, remove when you want SSL in future)
<?php
add_action( 'widgets_init', 'wpe_remove_encourage_tls', 0 );
function wpe_remove_encourage_tls() {
remove_action( 'init', 'wpesec_encourage_tls' );
}
@emilyljohnson
Copy link

When I try to add a category in the admin area, the category list does not automatically refresh and show my new category until I do a manual page refresh. I deactivated all plugins and activated the Twenty Seventeen theme and the issue persisted.

I finally perused through my mu-plugins and found that this plugin was the culprit. Here's the warnings that are being thrown:

Warning: Use of undefined constant widgets_init - assumed 'widgets_init' (this will throw an Error in a future version of PHP) in /wp-content/mu-plugins/x_disable_wpesec.php on line 6

Warning: Use of undefined constant wpe_remove_encourage_tls - assumed 'wpe_remove_encourage_tls' (this will throw an Error in a future version of PHP) in /wp-content/mu-plugins/x_disable_wpesec.php on line 6

Warning: Use of undefined constant init - assumed 'init' (this will throw an Error in a future version of PHP) in /wp-content/mu-plugins/x_disable_wpesec.php on line 4

Warning: Use of undefined constant wpesec_encourage_tls - assumed 'wpesec_encourage_tls' (this will throw an Error in a future version of PHP) in /wp-content/mu-plugins/x_disable_wpesec.php on line 4

Removing this plugin resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment