Can anyone tell the exact use of archive.php file in wordpress. I've googled and got a solution as the order of templates in https://codex.wordpress.org/Category_Templates. I wish to get a more precise answer. Also, what will happen if I delete this file?
Thanks
When you are building a WordPress Theme, you have the option of adding a file named archive.php to your theme.
It is optional because if you don’t have it, then the index.php will handle the output of archive type posts.
Now as a refresher, an archive page in WordPress is referring to a collection of posts grouped by category, author, date, tag, etc.