In our earlier articles, we showed a way for users to remove the visual editor mode from the WordPress post panel. The downside of that trick is that it requires editing each user profile and setting a preference. In this article, we will share with you a way that you can set HTML Editor as the default editor for all users in your WordPress site.
By default, Visual Editor is the default post editor for WordPress, so there is no need for you to add any codes. You are good to go from the start. But if you want to make the HTML editor as the default post editor in WordPress, then open your theme’s functions.php file and paste the following code:
add_filter( 'wp_default_editor', create_function('', 'return "html";') );
Now, you don’t have to heckle your users with the Visual Editor. If you want to customize more options for different user roles, then we recommend you check out the WordPress Adminize Plugin.
Source: WP Snippets