Reputation: 3846
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:
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?
Upvotes: 39
Views: 88403
Reputation: 137
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
Upvotes: 0
Reputation: 771
In my case, I had deregistered dashicons:
wp_deregister_style('dashicons');
Removing that line made the admin-bar.css file load again.
Upvotes: 0
Reputation: 2341
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.
Upvotes: 1
Reputation: 1049
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
Upvotes: 0
Reputation: 111
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...
Upvotes: 0
Reputation: 21
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.
Upvotes: 2
Reputation: 7
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
Upvotes: -3
Reputation: 1
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.
Upvotes: 0
Reputation: 1
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
Upvotes: 0
Reputation: 1538
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.
Upvotes: 27
Reputation: 1601
In wp-config.php
before require_once
add below code into file :
define('CONCATENATE_SCRIPTS', false);
Upvotes: 158
Reputation: 7289
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');
Upvotes: 0
Reputation: 3557
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.
Upvotes: 0