I am creating a custom CMS in PHP (written from scratch) and want to know whether I should store user created pages as files or in a MySQL database.
The content is all H
You'd be better off storing content in the database. Note that you store content, not the entire HTML page (otherwise, you're not really building a content management system).
If you implemented it using plain files then you'd have to invent a file format for storing your structured data in, you'd have to figure out how to make it fast, worry about data integrity and race conditions, and more. With a database you get all this already done for you and it's done well and fast.
It's quite normal to do a database query on every page view; indeed it is typical for web apps to do more than 5 and up to 30 database queries on every page view, and I would guess that stackoverflow.com would probably fit into that range.
MySQL is fast enough.