How do I combine a theme with a plugin

If a plugin is essential part of the theme it should be shipped as part of the theme and not as a separate plugin.

In theory, there is no way to do what you want without getting users surprised and upset when they want to use the plugin but not the theme. In practice, you can hack something but this is a bad idea with possible surprising edge cases you will not like to handle.

Best that can be done, is to notify the user that he needs to activate the plugin when the theme is active.

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