How To Fix WordPress Admin Styles Not Loading

This is one of those articles you tuck away in Evernote or your favorite “read it later” app because it will most likely not mean anything to you right this moment, but when it does happen, you will be glad you saved this.

When I got my new computer, I took the opportunity to clean up my local development environment. That meant a fresh installation of MAMP Pro and some new databases.

I got everything setup and I was settling in for a good, long second shift when I saw this in my WordPress admin.

WordPress Admin Styles Missing
WordPress admin CSS styles missing.

All the WordPress admin styles were not loading.

This was not what I had planned for my evening… *sigh*

I wasn’t sure what was going on… Could it be something wonky with my new computer? Was it due to updating to the shiny new WordPress 3.5? I tried to reinstall WordPress a couple of times to no avail, so intense Google searching ensued.

I cannot remember how many articles I read or how many suggested hacks I attempted. I do know it took well over an hour and none of them worked. Then I found something buried deep in some sketchy looking site, but it worked!

I am not trying to hold out on giving credit to the person who suggested it. I simply did not think to save the URL at the time. But this is what the article suggested.

And let me be clear… I do not encourage WordPress core hacks, but in the moment, I just wanted to fix it and move on with my small window of time I had to work on my hotfix.

In the wp-admin/load-styles.php file, find this line of code…

…and change it to this…

…and then simply refresh your WordPress admin screen a few times. You should see the WordPress admin CSS styles come back to normal.

That’s it! And you do not even have to leave this WordPress core modification in place. Once the admin styles come back, you can revert the line of code back to what it was and you should still have smooth sailing after that.


Dan in the comments also said that simply adding the code below to your wp-config.php file will also do the same trick. It certainly feels better than modifying the WordPress core, even if it is just temporarily.

So if you ever run across this, perhaps it can save you some time and get you back on track. I am not saying this will work in all cases of the WordPress admin not loading the styles, but this is what worked for me.

I have no idea why this works, so if you have a more technical or detailed explanation of why, then I would love to hear so in the comments.

I have never had this happen again, otherwise, I will dig in much deeper next time to see if I can identify a root cause.

53 thoughts on “How To Fix WordPress Admin Styles Not Loading”

  1. I also had this issue with MAMP pro. I found that adding:

    define(‘CONCATENATE_SCRIPTS’, false );

    to wp-config.php worked as well. Perhaps you might feel a little better modifying config file over a core file.

    1. Dan : :

      Thanks for sharing!

      Your answer certainly feels better than modifying core WordPress files, but the fact that it has to be done at all is not right.

      I hope to dig into this deeper in the next week or so. I would love to figure out what is really going on. Perhaps you “fix” could help shed some light on that investigation.

      I’ll be sure and post the answer, if I get it figured out.

    2. THAT should be a big help identifying the cause. See for example the following article:

      So basically, some script is fuciking up the complete minification process, maybe a plugin using depecretated functions, or just being broken, while hooking into the WP admin CSS queue, eg. because of a newer PHP version, or maybe some minuscle changes due to the update, etc.

      cu, w0lf.

  2. Hey thanks for sharing. That solved the Problem !!
    I truly enjoyed reading about somebody else going through this exact same problem :)

    Thanks again!

  3. Hi,

    Thanks for sharing! I’ve been having this problem for quite a while now.. but only with Google Chrome, and not only in the WP Dashboard but on every site. Had to reload them like 3 times until they loaded in properly.

    Thanks for the sharing again, one issue fixed!

    Andor Nagy

  4. Michael,

    Thanks for writing this. After some Google searching this article popped up.

    I was really hoping either of two fixes would work.

    Unfortunately they did not. :(.

    I’ve also tried deactivating all plugins, re-installing wordpress, and it still persists.

    I’m guessing its a theme issue.

  5. Great solution with adding single line to wp-config, thanks :)
    The reason is interesting. Is it related to web server? I have tons of installed wp in my server, but only one of them had this issue. Same settings, same web server.
    In 2012 i have similiar problem (with wp-admin js scripts), that time i solved it with removing wp-admin and wp-includes folder and replacing them new fresh folders from WP install zip. That one also solved problem. But this time my site was in production mode with online users, so i decided to do easier one, which Dan suggested in comments above.

    1. Elvin : :

      I am fairly sure it is a sever issue, but I cannot explain why.

      I have tried to debug it multiple times and have always come up empty handed. It really bothers me that I cannot figure out the root cause, but at least we all know now how to get around this and keep on making progress with our projects.

      If you ever figure out what it going wrong or what configuration is making it trip, I’d love to know!

  6. the css was not loaded in my case ( with wordpress 3.7.1) because of an encoding problem
    force UTF8 encoding by replacing in wp-admin/load-styles.php the corresponding line by :
    header(‘Content-Type: text/css; charset=UTF-8’);

  7. Thanks for this. I had this issue in a single site of a multisite setup. The admin areas of the rest of the sites in the network were displaying fine. I was reluctant to edit wp-config as it applies to all the sites, but I tried adding define( 'CONCATENATE_SCRIPTS', false ); and it worked. Nothing changed in the other sites. I tried removing it and the problem reappeared. So I guess I’ll have to keep it there. Can you foresee any problem with that?

  8. Just restart apache. It appears like a caching issue where apache is caching the location of the css file(s), but after the updating wordpress, the new file(s) cannot be found.
    Simply modifying the load-styles.css file forced apache to re-read it and cache it correctly.

  9. Yeahhh ! merci pour ton post !

    j’ai un hébergement chez Gandi et le CSS du panel d’administration ne fonctionnait pas !
    je suis heureux d’avoir trouver ton post, en rajoutant
    define(‘SCRIPT_DEBUG’, true);
    define( ‘CONCATENATE_SCRIPTS’, false );

    et dans le load_style.php
    error_reporting( E_ALL | E_STRICT );

    Tout marche ! (les images ne sont pas charger, exemple : icone de mon extension “Allow PHP in Posts” )

    Merci encore

  10. Hi Michael,

    I’ve had this issue for quite some time as well, disabling script concatenation worked of course. I have to agree that this looks like a server issue. I used to use MAMP Pro but I am now using Vagrant to set up local sites. Since the switch I have not seen this. I have also had sites mirrored from a MAMP install to an online version exactly, right down to table prefixes and I have never experienced it there either.

    Regretfully I can’t offer an explanation either, it eludes me what could have an effect on this on a server level.


  11. Unfortunately, none of these solutions worked for me :-(
    My site has been fine for months and now my dashboard is broken and impossible to work with…

  12. Yet one more thanks, snippet works in wp-config! Was upgrading an old 2.8 site to 4.1, incremental upgrades of course and towards the end, the admin started playing up and after re-installs, digging into themes, plugins etc, I came across your site. Thanks!

  13. I finally found the right search term to happen upon this article and found this also works if the JavaScripts in general are not loading in the administration panels as well.

    Thanks for posting this!

  14. Concatenate Scripts worked for me.

    This showed up after I installed the Sumo Me plugin but didn’t appear on my MB Air, but appeared on a Windows box (Chrome, IE) and wifey’s MBP (Chrome).

    JS enabled on all.


        1. Broken Themes

          The following themes are installed but incomplete. Themes must have a stylesheet and a template.
          Name Description
          automaticbacklinks_cache Stylesheet is missing. Delete
          cgi-bin Stylesheet is missing. Delete
          wc-logs Stylesheet is missing. Delete
          wp-admin Stylesheet is missing. Delete
          wp-content Stylesheet is missing. Delete
          wp-includes Stylesheet is missing. Delete

          That tells me that I’m missing these files, I loaded again wordpress site, thema, I disabled all plugins and we have restored one by one, so do ….

          Ideas, solutions?

  15. Hi Michael,

    Have you managed to pin point the initial server issue yet?
    As I’ve woken up to this simultaneously happening across 8 sites on our dedicated server.

    I’ll try your fix – but I need to work out the root issue alongside that!

      1. I think it is something related to the webserver, either with the file encoding or with the escaping of special characters.

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

    все работает!!!

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

    it saved my job…
    Thanks a lot.

  18. A slightly different version worked for me

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

  19. thanks so much :)

    I spend many hours looking for solutions for this….

    I had wp-login.php only with txt, my hosting company say that it was browser problem ….
    it helps me also :)

    thanks for blog.

    1. Akshay : :

      In the article I say:

      I have never had this happen again, otherwise, I will dig in much deeper next time to see if I can identify a root cause.

      I have no idea why. I tried debugging one day once someone in the WordPress community challenged me to figure it out versus providing “hacks” to circumvent the problem. Unfortunately, I was never able to root cause it. And since it’s still never happened to me again, I haven’t had any motivation to dig in again.

      Regardless, the article is still helpful to those who just want to get things back in working order and move on with whatever they were trying to do.

      Hope it helped you out!

      1. Thanks a lot…

        this method worked for me…

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

        I made it sure to return back and compliment. :)

        but still curiosity to know as to why on my IP its not working,
        but if I changed my IP, admin page opens up.

        hope someone comments the real issue is.
        thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *