Sometimes you may want to test your site by using another CDN or by removing it from your application. You may also be wondering why there isn't a feature button that automatically disables the CDN.
This article will explain why removing the CDN is a manual process and how to disable the CDN in WordPress.
Why You Can't Disable CDN Outright
While there are several ways to go about this, there is a good reason not to have a button that automatically disables the CDN. If we allow the ability to disable the CDN from within the Nexcess portal, this could potentially cause catastrophic problems with the application, such as a broken site. In addition, with a disabled CDN, the static assets would no longer connect as the CDN is not active.
Thankfully, there are several ways to break the CDN connection from WordPress without disrupting the application's static assets. We can easily sever the CDN endpoint connection by simply deactivating the CDN plugin, such as "CDN Enabler."
Disabling the plugin can be done from within the WordPress admin dashboard. You can also disable the plugin using WP-CLI, a command-line tool.
wp plugin deactivate cdn-enabler
The reason why we can outright disable the plugin is that it's only function. Other plugins make more use than just CDN, however. For example, plugins such as W3 Total Cache and WP Rocket are caching plugins that you would not want to disable outright. Instead, each plugin can turn off CDN directly from the plugin settings.
See the following articles for details on how to set up a Nexcess CDN.
Our award-winning customer care team is here for you.Contact Support