Allow the access over wp-login.php

Use the hook template_redirect instead – this will ensure it only runs on the front-end of your site, and not for the admin, login, registration or signup pages. function wpse_159552_maintenance() { if ( ! is_front_page() ) { wp_redirect( home_url() ); exit; } include ‘maintenance/index.html’; exit; } add_action( ‘template_redirect’, ‘wpse_159552_maintenance’ );

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