WordPress Admin JS Errors Galore: Load-Scripts.php

When moving to nginx for the first time I had the lovely idea to put all 8 sites from my personal centos 6.5/apache 2 server into technology I’ve never used before.

Lots of small issues were encountered immediately but they all seemed to have quick google-able fixes.  Until the load-scripts.php errors began happening.  After a couple weeks of slowly tweaking the new server and trying not to break it, it broke.  I don’t know which tweak of mine caused it as I didn’t notice it until doing some plugin upgrades on one of my sites.  Then it started popping up more and more.  Unexpected ending in my javascript, this error was showing all over the place with different sources.

After a lot of debugging including some Tiger Woods Bobble Head debugging, I found a pattern.  When load-scripts was pulling in a bunch of libraries it would just stop loading at seemingly random points.  Error logs were showing permission errors to /var/lib/nginx.  A light came on, I had recently changed the default user www-data; line in nginx.conf to user ftpuser; in an attempt to have WordPress and my ftp user able to write to the server.

Switched it back to www-user and everything was fixed.  Now I just need to really dive in to users/groups and permissions on nginx and do it the right way.

1 thought on “WordPress Admin JS Errors Galore: Load-Scripts.php”

Leave a Reply

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