Rich Text/Visual/WYSIWYG Editor does not work in WordPress behind cloudfront

WordPress decides if the Rich Text / Visual editor should display based on the browser user agent.

Unfortunately if you host WordPress behind cloudfront then WordPress will only see the “CloudFront” user agent. It will disable the visual editor and cause a bunch of issues.

The quickest way to enable the visual editor again is to add this to your theme functions.php file:

function dtbaker_wp_cloudfront(){
add_action( 'init', 'dtbaker_wp_cloudfront' , 9 );

Leave a Reply

Your email address will not be published. Required fields are marked *