ARTICLES

Use Replace Asset Source WordPress Plugin To Solve Maxcdn Bootstrapcdn MCMC Blocked Issue In Malaysia

After identified the culprit causing your website loading speed slow and confirmed that it’s due to Malaysia MCMC blocked , let me show you how to replace the culprit javascript or css file in WordPress.

Prerequisite

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.

Replace Asset Source Setting Page

Add New Asset Replacement Setting

Now, just simply hit the New Replacement button and set the culprit javascript or css in the Target Asset Url field, and set another alternative working javascript or css in the Replacement Asset Url field.

**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.**

Example:

Font awesome css from Affiliate WP MLM plugin loading from maxcdn.bootstrapcdn.com

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.

Example of my replacement setting

Next, just tick the Activate Asset replacement checkbox and click Save button.

Replacement Successfully

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.

Now the culprit replaced by my desired source, cdnjs.cloudflare.com

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.

  • About Author

    Jenn@Itchycode
    I like to solve problems by coding. I like websites, web applications and everything viewable from browser. Knowledge sharing can grows my confidence. A simple "thank you" will make my day :)
    More about me

Subscribe For Notification

Get notification whenever new article published.
Subscription Form

Discussion

COMMENT

Thank you so much for your effort to help up the local community~

Reply
By Julian Song (2 years ago)
New comment
Comment Form