Title: Disable js scripts on backend admin area
Last modified: January 15, 2021

---

# Disable js scripts on backend admin area

 *  [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/)
 * I have 2 js files on the backend that have 504 errors. Pages doesn’t fully load
   in the backend until the timeout. I contacted the host but I would just like 
   to disable the script on the backend until this is fixed.
 * This is one of the scripts: `/wp-includes/js/jquery/ui/checkboxradio.min.js`
 * I know it needs to be dequeued in child theme, functions but I don’t know how
   to write it and limit it to the backend of WordPress (WordPress dashboard admin
   area).
 * Thanks in advance.
    -  This topic was modified 5 years, 3 months ago by [Dan14](https://wordpress.org/support/users/dan14/).
    -  This topic was modified 5 years, 3 months ago by [Dan14](https://wordpress.org/support/users/dan14/).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13912798)
 * What is the error?
 *  Thread Starter [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913115)
 * 504 timeout. What script should I add to functions.php to dequeue it? There are
   2 js scripts Im trying to remove from loading in wp-admin.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913131)
 * Please try installing [https://wordpress.org/plugins/enable-jquery-migrate-helper/](https://wordpress.org/plugins/enable-jquery-migrate-helper/)
   to see if that fixes the issue.
 * Also, check the browser console for errors.
 * This may be a plugin or theme conflict. Please attempt to disable all plugins,
   and use one of the default (Twenty*) themes. If the problem goes away, enable
   them one by one to identify the source of your troubles.
 * If you can install plugins, install “Health Check”: [https://wordpress.org/plugins/health-check/](https://wordpress.org/plugins/health-check/)
   On the troubleshooting tab, you can click the button to disable all plugins and
   change the theme for JUST you, while you’re still logged in, **without affecting
   normal visitors to your site**. You can then use its admin bar menu to turn on/
   off plugins and themes one at a time. See [https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/](https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/)
   or [https://rankmath.com/kb/check-plugin-conflicts/](https://rankmath.com/kb/check-plugin-conflicts/)
   for more information.
 * See [http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/](http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/)
 *  Thread Starter [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913173)
 * I disabled jquery migrate a long time ago via a plugin. I dont think its related,
   site health is good. The 504’s are server-related I believe and its clogging 
   my wp-admin. I would rather just dequeue those scripts from loading in the backend.
   T
 *  Thread Starter [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913189)
 * In the console I have this message: load-scripts.php?c=0&load[chunk_0]=jquery-
   core,jquery-migrate,utils&ver=5.6:5 JQMIGRATE: Migrate is installed, version 
   3.3.2
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913312)
 * That’s not particularly easy to do. See, all those jQuery UI scripts are dependencies
   of each other. Removing the checkboxradio script would also remove the button
   script, which would remove dialog and spinner. This would in turn remove wpdialogs.
   Basically, a bunch of stuff just up and stops working.
 * If you’re getting a 504 error for the file, then you are correct about it being
   a server thing, but a simpler fix would be to simply check the file. See if it
   has the correct file permissions, the same as the other files around it. If it
   has the wrong permissions or file ownership, then the server can’t read it, and
   thus the server error. This is something you should be able to check for yourself
   on any hosting system.
 *  [fullworks](https://wordpress.org/support/users/fullworks/)
 * (@fullworks)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913333)
 * “504 Gateway Timeout server error response code indicates that the server, while
   acting as a gateway or proxy, did not get a response in time from the upstream
   server that it needed in order to complete the request. ”
 * This would indicate that you are perhaps using a CDN or other sort of proxy
 * If you are then perhaps there is a method of bypassing it and accessing local
   copies when in admin pages
 *  Thread Starter [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913390)
 * Thank you all for your replies. I am using a CDN, thats correct. Full site delivery.
   I can create a rule to bypass cache for that specific file and see how it goes.
 * The part I do not quite understand is that when `/wp-includes/js/jquery/ui/checkboxradio.
   min.js` is called it triggers 504. When I add ?nocache=1 to the url `/wp-includes/
   js/jquery/ui/checkboxradio.min.js?nocache=1` the file loads (200). This is all
   CDN related?
 * (Update: Its not cached by the CDN, all requests in wp-admin are proxied from
   the server)
    -  This reply was modified 5 years, 3 months ago by [Dan14](https://wordpress.org/support/users/dan14/).
    -  This reply was modified 5 years, 3 months ago by [Dan14](https://wordpress.org/support/users/dan14/).
 *  [fullworks](https://wordpress.org/support/users/fullworks/)
 * (@fullworks)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913931)
 * Yes CDN related.
 * Bonus points to me 🙂
 * edit…
 * (Update: Its not cached by the CDN, all requests in wp-admin are proxied from
   the server)
 * ummm – are you also using a caching plugin
 * less bonus points to me 🙂
    -  This reply was modified 5 years, 3 months ago by [fullworks](https://wordpress.org/support/users/fullworks/).
 *  Thread Starter [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913987)
 * Well yes, you pretty much figured I am using a CDN. I cant tell if its a caching
   issue. WordPress loads over 20 files, 1 file getting 504, and to say it is caching,
   its even not a js I use…
 * The temporary solution to this is a 301 redirect to ?nocache=1 and that fixed
   it. I am going to find out where the host is blocking some of the CDN ips that
   could also result in 504.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Disable js scripts on backend admin area’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 10 replies
 * 4 participants
 * Last reply from: [Dan14](https://wordpress.org/support/users/dan14/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/disable-js-scripts-on-backend-admin-area/#post-13913987)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
