WordPress CDN in cPanel
The WordPress CDN optimization tool creates a subdomain in your account that is linked to the site's
/wp-content directory and then it caches the queries directly on the web servers. This allows a significant reduction in I/O (input/output) operations and a faster speed of serving static content to users.
Open cPanel > WordPress Management > WordPress CDN:
A table, containing the following information for each individual WordPress site in the hosting, will appear:
- Name - shows site's name;
- Path - path to the site's installation directory;
- URL - link to load the site in a new browser window;
- CDN - shows the status of the CDN connection and contains a button that activates/deactivates the option.
Click the Enable button to activate the option - a window with the following content will be loaded:
Important: If the domain name does not use our DNS servers, you must route the A domain record to the specified IP address (in example 220.127.116.11).
Click the OK button to enable subdomain creation. In the table row with the site's information, the Disabled status will change into an URL of the new subdomain in the CDN column:
Click the site's URL to load the site in a browser. Depending on the size of the homepage, you may not notice the difference in the loading speed.
Let's remind you that the work of the WordPress CDN tool consists of two steps - creation of a new subdomain from where the site will load the static content, and direct caching of HTTP requests. In order to see the maximum output of WordPress CDN work, after creating a subdomain, the site must be loaded to cache the query.
We'll use again Pingdom Website Speed Test (
https://tools.pingdom.com) to check the effect of the WordPress CDN optimization tool usage. We are loading the site several times with disabled WordPress CDN and are recording the fastest result:
Then we activate the WordPress CDN and repeat the same steps to get the fastest loading time (make sure you're using the same data center for both tests - we used Frankfurt, and you are testing with the same web page):
After activating WordPress CDN, the test page load time was 9.31% faster.
If you right-click within the site and select View Page Source from the menu, you will see that some of the static files (
image) are being loaded from the created subdomain. Press
CTRL+F and enter cdn - your browser will show you all the static files in the code (in the example 23 files in total) that are loaded from the cdn subdomain:
If you decide to disable WordPress CDN in the main toolbar, you must click the Disable button - a few seconds later the status in the CDN Column will change to Disabled and the button label will change to Enable.