There are two ways to do it, in bulk and individually.
The individual way for single post or page:
- Open your post or page, and in the top right-hand corner of your WordPress admin panel, there is a tab called Screen Options.
- Click to toggle the screen options tab.
- Check the box for Discussion
- Click the Screen Options tab again to close it.
After that, scroll down the page to Discussion settings and uncheck the boxes for “Allow comments” and “Allow trackbacks and pingbacks on this page”.
The bulk way, for all pages or posts:
- Go to All Posts » at top next to title check the box to select all pages
- Click “Edit” under bulk actions
- Click “apply”
- Choose “do not allow” next to comments
- Click “update”
Now repeat the bulk edit for all Pages and that’s it.