WordPress detects the wrong timezone

Turns out there was a previous attempt to fix the timezone: date_default_timezone_set(‘America/Sao_Paulo’); was called on the init hook. When later the correct UTC time, local time and timezone were properly set on the server, this caused a conflict. Removing this solved the issue.

WordPress time queries

WordPress tries to set PHP environment to UTC timezone. Usually it is more reliable to use time zone-aware WP functions, such as current_time(), rather than vanilla PHP functionality.

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