39

I'm having a problem with the admin on a Wordpress site. I've scoured the interwebs and seen lots of other people with the same problem, but no definite solution. The admin is showing like this:

enter image description here

And when I inspect it, I get a 500 (Internal Server Error) on both load-styles.php and load-scripts.php

Anyone know what's up, and how to rectify?

3
  • 1
    Have you tried uninstailling and then reinstallining Wordpress? Commented Sep 12, 2013 at 16:19
  • are you getting the same error on your subpages, like Add New?
    – JP Lew
    Commented Sep 12, 2013 at 16:25
  • I had a similar problem, managed to fix it by hitting the Reinstall Now button on the Updates page under "If you need to re-install version 5.3.2–en_AU, you can do so here:"
    – clayRay
    Commented Mar 12, 2020 at 1:42

13 Answers 13

155

In wp-config.php before require_once add below code into file :

define('CONCATENATE_SCRIPTS', false); 
9
  • 1
    Confirmed. This one is the one that works. The other answer below kind of works too but not nearly as well as this one. Deleting browser cache and everything, that was useless. Just as another note - if you installed wordpress using digitalocean, you have to go to cd /var/www/html to find your wp-config.php file. Took me a stupid amount of time to find it.
    – Lionel Yu
    Commented Sep 20, 2018 at 0:42
  • 1
    This worked for me and worked only before "require once", I tried before using other thread here and put it under, and did not work. Commented Sep 14, 2019 at 11:52
  • Excellent soluiton. Commented Dec 26, 2019 at 14:23
  • 1
    Worked for me it's 29th Jan 2024 and it's still working. Thanks Commented Jan 29 at 10:59
  • 1
    Worked for me too. Thanks! I'd like to know why it works.
    – Steve Yost
    Commented Apr 30 at 18:13
27

Just to keep everything in one answer, this worked for me:

define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
define( 'CONCATENATE_SCRIPTS', false );
define( 'SCRIPT_DEBUG', true );

After page refreshing and it looks OK, maybe after re-login, set SCRIPT_DEBUG to false.

Don't forget about those last two settings if you're using a plugins for debugging or site optimization - though such plugins might override those settings.

2
  • This works except using localhost leads to no valid ssl keys. And commenting out force_ssl leads to prefect working scenario. Commented Feb 6, 2019 at 9:10
  • This is work for me. Add before require_once to works like charm!!!!!!!
    – satyawan
    Commented Mar 22, 2021 at 7:46
2

Also had similar issues that affected custom fields and elementor plugins only after upgrade to the latest version of wordpress (5.5.1). It was affected by the theme used (not developed by me). Switching between a default theme fixed the problem. There were no errors displayed or logged. Also project in live server without xdebug or other means of debugging except plain old way.

A simple change made, were there is no more 'type="text/css"' in the tag and the use of a pregmatch filter was the problem :)

preg_match_all("!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", $input, $matches);

fix:

preg_match_all("!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' (?:type='text\/css')*media='(.*)' \/>!", $input, $matches);

Found e perfect inspiration here enter link description here.

1
  • Oh wow! I've been having this problem for such a long time and this is the only fix I've found to work for me (out of about 15 which I've tried)!! Thank you very much. In my situation, the dashboard styling was gone after updating to v5.6, despite the clone staging site working perfectly fine on 5.6... Either way, going into my theme's lib/cleanup.php and replacing these lines worked instantly! Can't believe it! Thanks very much :)) Commented Jan 20, 2021 at 20:58
1

First check with what file does not loading (404) Then you can identify which file does not load. If WordPress wp-admin or wp-include then check your WordPress version and replace the file. Then your issue will be fixed.

0

Put define('SCRIPT_DEBUG', true); in wp-config.php and debug through console. It will tell you which file is not found during page load.

0

the CSS was not loaded in my case ( with WordPress 3.7.1) because of an encoding problem.

Force UTF-8 encoding by replacing in wp-admin/load-styles.php the corresponding line by :

header('Content-Type: text/css; charset=UTF-8');
1
  • In my case this line is correct but still, WordPress is unable to load load-styles.php on Add New page only, on other pages, it is working fine. Version 5.8.1 Commented Sep 11, 2021 at 7:01
0

In wp-config.php file you can add - define( 'SCRIPT_DEBUG', true); This solves the problem but, it is not good practice to leave this config on true while on production.

Hope it helps

0

I was having a similar issue with a new installation of Wordpress that needed redirecting to a temporary url.

My solution was to make sure the siteurl and home url had the http:// at the beginning of the url.

Hope it fixes it.

0

PHP Memory Limit could also be the problem, if it is too low for the page loading in backend, WP simply stops loading scripts. Setting up MemoryLimit 256->512 worked for me...

0

Using Lightsail with wordpress bitnami and wp-rocket here. Too specific to be honest.

The problem was the cache, wp-rocket is not compatible with mod_pagespeed.

The solution was to purge the mod_pagespeed cache

sudo touch <installdir>/apache2/var/cache/mod_pagespeed/cache.flush

Then

sudo <installdir>/ctlscript.sh restart apache

And after, disable the mod, commenting out the following lines in the <installdir>/apache2/conf/httpd.conf file:

  #Include conf/pagespeed.conf
  #Include conf/pagespeed_libraries.conf

and restart for second time apache

sudo <installdir>/ctlscript.sh restart apache

Where <installdir> was /opt/bitnami, could change for multisite, if I'm not wrong

Source wp-rocket incompatibility

Source disable mod_pagespeed

0

In my case, I had deregistered dashicons:

wp_deregister_style('dashicons');

Removing that line made the admin-bar.css file load again.

0

Adding these two lines to "wp-config.php" worked for me. I had the same issue.

define( 'CONCATENATE_SCRIPTS', false ); 
define( 'SCRIPT_DEBUG', true );

source: https://wordpress.stackexchange.com/questions/163802/no-css-being-loaded-on-backend

-3

i know this is an old post but maybe i can help other who are having the same issus

before you put another codes in you wp-config file , make sure that the folder wp-content permissions is 755

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