Changing the post type name from
By default, WordPress has two post types: Posts and Pages. This example shows how to change their names throughout the admin area.
Sometimes it is convenient or logical to replace the word "Posts" and all related names of "Posts" in the admin area with another word, for example, "Articles":

The code is simple and works very quickly:
add_filter( 'post_type_labels_post', 'rename_posts_labels' );
# replace the word "posts" with "Articles" for post type 'post'
function rename_posts_labels( $labels ){
// automatic replacement is not possible: Post = Article, and in the text we will get "View article"
$new = [
'name' => 'Articles',
'singular_name' => 'Article',
'add_new' => 'Add article',
'add_new_item' => 'Add article',
'edit_item' => 'Edit article',
'new_item' => 'New article',
'view_item' => 'View article',
'search_items' => 'Search articles',
'not_found' => 'Articles not found.',
'not_found_in_trash' => 'Articles not found in trash.',
'parent_item_colon' => '',
'all_items' => 'All articles',
'archives' => 'Article archives',
'insert_into_item' => 'Insert into article',
'uploaded_to_this_item' => 'Uploaded for this article',
'featured_image' => 'Article thumbnail',
'filter_items_list' => 'Filter articles list',
'items_list_navigation' => 'Articles list navigation',
'items_list' => 'Articles list',
'menu_name' => 'Articles',
'name_admin_bar' => 'Article',
];
return (object) array_merge( (array) $labels, $new );
}
Read more about how this code appeared in the question.
—
Note embeded into: Admin Panel. 15+ Hooks for functions.php