404 Error on pagination with WP Query

I have figured out the problem. There was a naming clash between my post type insights and the page name (also insights) which was confusing WordPress. Changing the post type to the singular insight fixed it.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)