WordPress Admin area doesn’t load CSS Styles and Scripts

Issue

After moving a WordPress site from a development environment area to the production (which involved the domain change), the wp-admin area doesn’t load any CSS Styles or Scripts. Basically, the admin section is completely broken. The website front-end is not affected and working fine.

Browser Dev Console shows 403 (Forbidden) errors loading files wp-admin/load-styles.php and wp-admin/load-styles.php.

Failed to load resource

Failed to load resource: the server responded with a status of 403.

The issue was not client-related, different browsers and PCs are affected. 

Resolution

The short-term resolution was to add the following line to wp-config.php:

define(‘CONCATENATE_SCRIPTS’, false);

Another option was to add:

define( ‘SCRIPT_DEBUG’, true );

Which also resolved the issue.

The long-term solution was to do… absolutely nothing… I assume this was some sort of WordPress cashing issue. About 5 hours after the migration, everything started working correctly.

October 2023
WordPress 6.3.2

 

 


Comments

Leave a Reply

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

Captcha
captcha
Reload