Michael Novotnymanovotny

How to fix WordPress admin styles not loading

After setting up my new computer and getting MAMP Pro running, I tried launching a WordPress project. The admin panel came up, but without any styles.

WordPress admin styles not loading

I tried reinstalling WordPress. No change. I spent a few hours digging through forums, trying countless suggestions. Eventually, something worked.

Open wp-admin/load-styles.php and find this line:

error_reporting(0);

And change it to:

error_reporting( E_ALL | E_STRICT );

After page refresh, the admin styles were back. I even switched the line back to its previous value, and everything still worked. Normally, I discourage editing WordPress core files, but I just needed to get back to work. Fortunately, you don't have to leave the change in place.

Someone else later mentioned you can add this code above any require_once calls in wp-config.php instead of modifying a WordPress core file:

define( ‘CONCATENATE_SCRIPTS’, false );
define( ‘SCRIPT_DEBUG’, true );

I’m not sure why any of this works. If you know, tell me. I'm curious.

For what it’s worth, I’ve never seen the issue again. If it ever happens again, I'll take the time to root cause the and submit a patch.