Skip to content

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_filter('user_can_richedit','__return_true');
}
add_action( 'init', 'dtbaker_wp_cloudfront' , 9 );
Published inWeb Development

Be First to Comment

Leave a Reply

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

© dtbaker.net