Support » Fixing WordPress » Javascript and CSS broken in wp-admin

  • Hello all,

    Asking for your help as I’ve been desperately trying to resolve this problem.

    My site seems to be working normally with all JS and CSS loading as expected in the main part of the website.

    However, in the /wp-admin (and wp-login) part of the website, the site appears something like this:

    As you can see, the CSS seems to not be working.

    I tried disabling the plugins one by one to no avail. I also tried deleting the content of functions.php in my theme to no avail aswell.

    I checked the network tab while logged-in to my wp-admin.php and found this:

    Upon further inspection I found that in fact these Javascript file seem to contain HTML code instead of Javascript code. I then went to the directory where these Javascript files are and their content is normal Javascript.

    How can I solve this problem of JS files (and CSS) loading with HTML code inside them instead of their actual JS (and CSS) contents, which is only happening in wp-admin and wp-login?

    Any help or hint is appreciated!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Please add the following defines in wp-config.php and test the pages / scripts.

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


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

    Thank you.

    Thread Starter wpadnan


    Hello Sundar,

    I already had CONCATENATE_SCRIPTS set to false. Setting the other definitions hasn’t changed much.

    I noticed that in fact only script files loading from /wp-admin have this problem. Scripts from /wp-content or /wp-includes or others load normally.


    In that case , please take a complete backup of website setup, manually update WordPress 5.5.1 ( WordPress Core ) and then test it. Hope this helps to sort out the problem and fix the issues.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Javascript and CSS broken in wp-admin’ is closed to new replies.