Cache management is a great tool to improve cPanel website performance and end-user experience. It collects frequently used information in a temporary memory location for quick data retrieval that limits access to the underlying storage layer, leading to reduced bounce rates, latency, and server load. This scales the scalability, load times, and an optimal user experience.
The cPanel in your WordPress Hosting server uses Nginx as a powerful caching proxy in front of Apache. This means your visitors will enjoy quick page loads with less effort on your part.
As the site administrator or developer, you have access to a new suite of tools in your WordPress-optimized cPanel.
Don’t have time to read our article? Watch our walk-through video.
Why Does Caching Matter?
For beginners, we’ll explain a little bit about what caching is and why it is so important for a WordPress site. If you’re an experienced user, you can skip ahead to the Cache Manager features for cPanel.
WordPress uses PHP (scripting language) and MySQL (database) to generate a page equivalent to a basic static HTML page. The process of generating the page uses computing power in the server. Once the page has been created, there’s no need to generate it again unless something has changed. If nothing has changed, we can use Nginx to “cache” the complete page and store it for use later. This means the page will load faster from the cached resource.
In the section below, you will learn how you can leverage the caching resources intelligently. Nginx will be able to detect if something has changed on a page, and it will reload the changes into the cached file automatically. However, if you are making a lot of changes to the site and want to see instant results, you can read on to learn how you can suspend caching temporarily.
Browser vs Server Caching
Browser Caching
Browser caching retains frequently accessed data on the user’s device to make it readily available whenever a user visits the same web page.
Pros:
Browser caching is capable of storing copies of web pages, such as multimedia content, pictures, HTML pages, and so on, which allows the browser to retrieve the cached files to enable an enhanced browsing experience.
Cons:
There is really no benefit to first time visitors as they’ll still experience full load times.
Ideal Use Case:
- Any static assets that rarely change (logos, fonts, framework files)
- Images and media files
- CSS and JavaScript files
- If you have a high amount of returning visitors (reducing load times)
Server Caching
Server caching retrieves the frequently accessed information from the server. Behind the scenes, when a user visits any website for the first time, they request the server, which in turn creates a copy of that webpage and stores it.
Pros:
When the webpage is revisited by the user, the server displays the result from the cache instead of downloading it from the server. This can save loading time and improve page speed and response times.
Cons:
If the underlying data changes and the cache is not updated, users may get outdated information. It can also be a more complicated setup for your team.
Ideal Use Case:
- If you have a WordPress site with complex themes or plugins
- Dynamic content that stays the same
- Database-heavy websites
- High-traffic sites needing faster response times
cPanel Cache Manager Features
Your WordPress-optimized server comes with a powerful Cache Manager tool you can use to intelligently manage cached resources. In the sections below, we will introduce you to some important features of the Cache Manager. Make sure to click the Save Changes button after making any changes.
Selecting a Domain
If you are managing multiple domains in your cPanel, you can simply select the one for which you want to affect cache management.
Purge URL
You have the option to purge the cache for a single page using the Purge URL option. Simply paste the URL of the page to purge and click the Purge button.
You could also use wildcards to get rid of multiple pages at once. Instead of manually refreshing each page individually, wildcards allow you to target a number of pages simultaneously sharing a unique pattern.
Disable Caching
If you are making a high number of radical changes to the site, and you want to see changes immediately, you will want to disable caching. This will suspend caching while you are working on the site, so you can see changes without having to repeatedly flush the cache.
Default Refresh Time
The default refresh time tells the caching service how long it should wait before checking for updates to your website.
If you are running an e-commerce website, we recommend you set the default cache refresh time between 1 and 5 minutes, depending on the nature of your web pages.
Shorter cache refresh
Inventory, product prices, quantity, and orders data is always in flux. For dynamic datalike this, the cache refresh time must be updated within the short intervals to synchronize with the live data.
Longer cache refresh
On the other hand, if your website contains static content like images and CSS, set a cache refresh time between 6 months to 1 year as the content doesn’t change often.
Bypass URL
The bypass URL setting tells the caching service which URLs should never be cached. These URLs will always be loaded directly from the server and never from the page cache. To add a new URL, click the + button. Conversely, to remove a URL use the X button.
Pages like login profiles, API endpoints, and dashboards require constant updates and live data from the server. These URLs should never be cached.
Similarly, if you own a retail store, the caching of checkout pages, cart, order summary, and payment should be grouped as Bypass URLs, as caching these pages can lead to incorrect product pricing, transaction, or payment issues.
Purge Full Cache
There may be occasions in which you want to apply changes to all domains. The Purge Full Cache button will effectively purge the cache for all domains owned by your cPanel user.
Compatibility with WordPress Caching
While WordPress has some excellent caching plugins, we don’t always recommend using them.
If your website already has a built-in caching mechanism or is embedded with a server-side caching solution, consider removing third-party caching plugins like WP Super Cache.
When two systems try to implement caching processes at the same time, unpredictable behavior often occurs, such as user errors and lagging updates.
Looking for more guides? We have over 400 WordPress How To Articles to help you!
Cache Management in cPanel Troubleshooting Guide
Cache not purging properly
Access your cPanel > File Manager, go to your website’s root directory, and delete any files in the cache folder. If you’re using a caching plugin, deactivate and reactivate it. Contact our support team if you still aren’t seeing a proper purge.
Error fetching cache stats
This typically means there is a server connectivity issue. Clear your browser cache, wait 5 minutes, then refresh your cache. If you still have an error, check your internet connection or contact our support team.
Changes not appearing after purge
Browser cache may still be active. Press Ctrl+F5 (or Cmd+Shift+R on Mac) to hard refresh. Consider it may take ~ 24 hours for DNS propagation. Then test in incognito mode to verify changes.
Browser cache vs server caching
Browser cache stores files on your device for faster loading. Server cache stores files on our hosting servers. If you clear a browser cache, it affects only your view; if you purge a server cache it affects all visitors to your site.
Developer mode availability
Our Developer mode varies based on your hosting plan. For WordPress hosting, check your admin dashboard under performance settings. For other plans, access cPanel > Software section. If you aren’t sure, contact our support team to confirm availability.
Looking for more guides? We have over 400 WordPress How To Articles to help you!