Install Replace Asset Source WordPress Plugin
As usual, go to your WordPress wp-admin and navigate to Plugins > Add New. Search for Replace Asset Source. Install and activate the plugin. Then go to Settings > Replace Asset Source. You will be able to see the screen as below.
Add New Asset Replacement Setting
**You could find many alternative cdn source from google, or you could head to cdnjs to get yours. **
**You must remove the version string from the culprit source.**
**You must follow the exact path of the culprit source, either contains https, http or empty protocol, just copy whatever you got from inspect element tab, otherwise the plugin might not be able to help you find and replace.**
My culprit script is https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css?ver=5.8.2, I should set the Target Asset Url as https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
And I will set the Replacement Asset Url as https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css
So the final setting as below.
Next, just tick the Activate Asset replacement checkbox and click Save button.
After that, just navigate to your front end and inspect your page again, you will noticed that the culprit script gone and replaced by your source as expected. If it’s not working, please check whether you are using cache plugin and purge the cache. Ensure you got no typo in on both Target Asset Url and Replacement Asset Url as well.
This Replace Asset Source WordPress plugin was written by me, my objective is to help WordPress owners who are not familiar with coding but still able to solve the slow website loading speed issue especially from Malaysia. To coders, you can just simply dequeue the culprit source and enqueue yours by using coding way anytime.