How to make wordpress more secure

  • 0
  • In function.php file add below codes to hide all editing features and css
  • :

function vc_remove_wp_ver_css_js( $src ) {
if ( strpos( $src, ‘ver=’ . get_bloginfo( ‘version’ ) ) )
$src = remove_query_arg( ‘ver’, $src );
return $src;
}
add_filter( ‘style_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 );
add_filter( ‘script_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 );
function remove_cssjs_ver( $src ) {
if( strpos( $src, ‘?ver=’ ) )
$src = remove_query_arg( ‘ver’, $src );
return $src;
}
add_filter( ‘style_loader_src’, ‘remove_cssjs_ver’, 10, 2 );
add_filter( ‘script_loader_src’, ‘remove_cssjs_ver’, 10, 2 );
remove_action(‘wp_head’, ‘wp_generator’);

function remove_generator_filter() { return ”; }
if (function_exists(‘add_filter’)) {
$types = array(‘html’, ‘xhtml’, ‘atom’, ‘rss2′, /*’rdf’,*/ ‘comment’, ‘export’);
foreach ($types as $type) add_filter(‘get_the_generator_’.$type, ‘remove_generator_filter’);
}
define(‘DISALLOW_FILE_EDIT’, true);
add_filter( ‘ot_show_pages’, ‘__return_false’ );
remove_action(‘wp_head’, ‘wp_generator’);

In function.php file add below codes to hide all editing features and css : function vc_remove_wp_ver_css_js( $src ) { if ( strpos( $src, ‘ver=’ . get_bloginfo( ‘version’ ) ) ) $src = remove_query_arg( ‘ver’, $src ); return $src; } add_filter( ‘style_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 ); add_filter( ‘script_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 ); function remove_cssjs_ver( $src ) { if(…

In function.php file add below codes to hide all editing features and css : function vc_remove_wp_ver_css_js( $src ) { if ( strpos( $src, ‘ver=’ . get_bloginfo( ‘version’ ) ) ) $src = remove_query_arg( ‘ver’, $src ); return $src; } add_filter( ‘style_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 ); add_filter( ‘script_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 ); function remove_cssjs_ver( $src ) { if(…