Ansis Spruģevics
Ansis Spruģevics

Reputation: 388

Wordpress admin panel missing styles and scripts

My Wordpress site, which was migrated from a subfolder (think /var/www/sitename/new_site/) to the site root folder (/var/www/sitename/). I used the plugin Search & Replace to fix all missing images and styles.

However, now the admin panel won't load any styles and just displays plaintext links. enter image description here

When I look at the network tab in developer tools, I see that 2 files returned HTTP 403 Forbidden - 1 request for /wp-admin/load-styles.php and 3 requests for /wp-admin/load-scripts. enter image description here

I have already attempted to use

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

This did not fix the problem.

The permissions for the wp-admin directories and files are 755 and 644 respectively.
I also generated a new .htaccess file using "Save Changes" in the Permalinks settings.

Upvotes: 3

Views: 4220

Answers (2)

Boshra Jaber
Boshra Jaber

Reputation: 1161

In my case, the wp-admin/css folder was missing. Adding it again fixed the issue

Upvotes: 0

Ansis Spruģevics
Ansis Spruģevics

Reputation: 388

Here are the correct statements:

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

The code I copied had incorrect quotation marks. Thanks goes to @j08691 for pointing this out.

Upvotes: 7

Related Questions