Wordpress admin not loading css/js

2020-03-01 04:59发布

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?

标签: wordpress
6条回答
倾城 Initia
2楼-- · 2020-03-01 05:37

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

查看更多
闹够了就滚
3楼-- · 2020-03-01 05:42

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

define('CONCATENATE_SCRIPTS', false); 
查看更多
放我归山
4楼-- · 2020-03-01 05:53

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.

查看更多
何必那么认真
5楼-- · 2020-03-01 05:54

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.

查看更多
戒情不戒烟
6楼-- · 2020-03-01 05:58

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.

查看更多
beautiful°
7楼-- · 2020-03-01 06:02

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');
查看更多
登录 后发表回答