Caching enhances the performance of a WordPress site in the quickest manner. The techniques outlined below demonstrate how to set up caching on a Windows hosting account; for implementing caching on a Linux hosting account, refer to the earlier post. What is WordPress Caching & How to Install W3 Total Cache Plugin.
1. Enabling Caching using clientCache
By using our Windows hosting accounts, you have the ability to establish caching rules that improve your website’s performance through the use of clientCache in your Web.config file.
Microsoft provides guidance on how to implement clientCache
herealong with more comprehensive details about the element here.
Example
Microsoft provides the example code below in a Web.config to activate caching:
This will store the specified static content in cache until January 19, 2038.
2. Enabling Wincache’s Opcode Cache
Wincache is a PHP extension developed by Microsoft® to boost the performance of PHP applications running on Windows platforms. All Windows web hosting accounts have access to the performance benefits of Wincache, although it is turned off by default.
You can learn more about the functioning of Wincache by going to PHP.net.
To allow your PHP scripts to use memory caching, referred to as opcode caching, you must modify your account’s php5.ini file to incorporate this directive.[wincache]
wincache.ocenabled = 1
Note: This configuration impacts every PHP script on the hosting account. Activating it could disrupt other applications you have installed.
This update may require as much as five minutes to be reflected on your website. To check if it’s active, open a simple text editor and create a file named phpinfo.php. Then, insert the following line:
Store this file in the main directory of your website and then navigate to yourdomain.com/phpinfo.php.
The wincache.ocenabled parameter display as On for the local value.
Thanks for visiting. For queries and suggestions, emails are welcome at learnweb@hostingcolumn.com.
Subscribe to Hosting Column for the latest updates and posts.