Wordpress - How do I remove unwanted pages like archive, search, etc.?

You could redirect anything that's not a page or admin to home via the parse_query action:

function wpa_parse_query( $query ){
    if( ! is_admin() && ! $query->is_page() ) {
        wp_redirect( home_url() );
        exit;
    }
}
add_action( 'parse_query', 'wpa_parse_query' );

If it's not an admin screen or a query for a page, it'll redirect. You can see all of the types of pages this will remove under the Conditional Tags page in Codex.


Joost de Valk's WordPress SEO plugin is capable of disabling most, if not all, archives you mention:

enter image description here


You can user another small script, without adding any plugin. There is a post here and the code to add in the index.php of your theme is this:

if(is_archive()) {
    // force 404
    $wp_query->set_404();
    status_header( 404 );
    nocache_headers();
    include("404.php");
    die;
}

Hope you find it useful.