I did some modifications to the wp-login.php, which worked fine on 2 testsites. They run higher version of php, i think both run php 7. The main site runs php 5.4 or something around it. On the main site as soon as i upload the child theme, then wp-login.php page simply goes blank.

It might be important to say, that everything else on the site show except the wp-login.php I believe it might be the low PHP version, but i'm not sure.

These are the codes:

function my_login_stylesheet() {
    wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/login_styles.css' );
add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

function my_login_logo() { ?>
    <style type="text/css">
        #login h1 a, .login h1 a {
    background-image: url(../wp-content/uploads/2017/08/login_logo.png);
    height: 125px;
    width: auto;
    background-size: 125px;
    background-repeat: no-repeat;
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );

function my_login_logo_url() {
    return home_url();
add_filter( 'login_headerurl', 'my_login_logo_url' );

function my_login_logo_url_title() {
    return '';
add_filter( 'login_headertitle', 'my_login_logo_url_title' );

How come it doesn't work?

  • Did you modify a core file? In that case, I suggest you immediately revert the changes, and then ask a question about how to it without modifying the core. I would be happy to help in that case.
    – Jack Johansson
    Aug 12 '17 at 10:55
  • Looking at the provided code he modified the file properly through hooks, so I don't think that's the problem.
    – Chris Cox
    Aug 12 '17 at 12:46

You can enable WP_DEBUG in your WordPress to get current error.

Set it on the wp-config.php file:

define( 'WP_DEBUG', true );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.