Give access only for a period of time [closed]

A membership plugin would be better for that, you can select content for each membership types as well. Try out https://wordpress.org/plugins/paid-memberships-pro/, it might solve your issue

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