Apache /Ubuntu server not running WordPress installation, outputting PHP code like HTML

Simple mistake. Needed to make sure I installed the correct php module for apache, which is libapache2-mod-php7.0. I had installed one for a previous version of php.

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