|
Postado Por robiulroky no Jan 24, 2024 4:07:52 GMT
Remember when we talked about customization? Here’s the most important fact about how to properly setup a CDN on WordPress. The vast majority of CDN plugins will tell you to include a directory for the CDN to “replicate” and they usually tell you to include wp-content. That’s fine for a general setting but it’s not good for your performance because the wp-content folder is filled with another very sensitive folder, the plugins and themes folder, including tons of Javascript & CSS files. You may lose performance when they aren’t cached as discussed earlier. So, how do we fix this? We simply include the folder wp-content/uploads. Such a simple solution! Shocked as you may be, the vast majority of plugins that handle CDNs will not allow you to do this. your CDN to your upload folder, i.e. your pictures only. cdn77-with-wordpress-17 A simple refresh of the site will allow the CDN to get the contents for you. In this example, we opened a Firefox Country Email List Developer Tab (F12) and searched for the first image. You can see clearly that the link was replaced and it’s now being loaded directly from the CDN instead of our host server. Before and After Let’s see how all this turned out ! cdn77-with-wordpress-19 cdn77-with-wordpress-20 In the left screen, we can see the time it takes to load the site from Sweden (which is far away from our host server in Las Vegas, remember?) In the right screen, we can see that the performance increased, the time was almost cut in half! All the essential files are still loading from our server in Las Vegas but the heavy burden files, like the images are loading from the node in Sweden.
|
|