Creating another wordpress site as sub-domain of a wordpress site

There are many reasons why WP could display this:

1 Insufficient file permissions on wp-admin folder (check this with ftp)

2 Prefix not consistently the same in database and wp-config (less likely in this case, but check anyway).

3 .htaccess doesn’t reroute wp-admin folder correctly

4 User roles not well defined in database (wp_capabilities should contain a:1:{s:13:"administrator";s:1:"1";} and wp_user_level should read 10)

5 All sorts of plugin screw ups.

For debugging you can use this snippet of code in functions.php to gain access. It bypasses the persmission system, so don’t forget to remove it once you’re done.

function wpse227971_skip_permissions ( $allcaps, $cap, $args ) {
    $allcaps[$cap[0]] = true;
    return $allcaps;
    }
add_filter( 'user_has_cap', 'wpse227971_skip_permissions', 0, 3 );