---
title: "W3 Total Cache &#8211; Guide to WordPress Caching"
description: "With over 1 million active installations, W3 Total Cache is one of the most popular ways to optimize and manage your WordPress site's cache. This can result in faster load times and less strain on..."
url: https://www.inmotionhosting.com/support/edu/wordpress/plugins/w3-total-cache/
date: 2022-12-21
modified: 2026-01-22
author: "Harry Jackson"
image: https://www.inmotionhosting.com/support/wp-content/uploads/2022/12/How-to-use-W3-Total-Cache.png
categories: ["WordPress Hosting", "WordPress Plugins"]
tags: ["Featured"]
type: post
lang: en
---

# W3 Total Cache &#8211; Guide to WordPress Caching

![How to Use the W3 Total Cache WordPress Plugin](https://www.inmotionhosting.com/support/wp-content/uploads/2022/12/How-to-use-W3-Total-Cache-1024x538.png)

With over 1 million active installations, **W3 Total Cache** is one of the most popular ways to optimize and manage your WordPress site’s cache. This can result in faster load times and less strain on your server, which can also help your **SEO** (search engine optimization) efforts.

Say goodbye to slow loading times and hello to high-performance websites with our [WordPress VPS Hosting](https://www.inmotionhosting.com/vps-hosting/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-cta2) plans. Experience 40x faster WordPress page load speeds on purpose-built servers that guarantee 99.99% uptime.

![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)High-Performance VPS ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Premier Care ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Free SSL & Dedicated IP ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Advanced Server Caching

[Managed WordPress VPS](https://www.inmotionhosting.com/vps-hosting/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-cta2)

## How to Use W3 Total Cache in InMotion Central

If you have an UltraStack ONE for WordPress server, W3 Total Cache is already pre-built into your website. All you have to do is enable it. 

1. From your InMotion Central project dashboard, click **Optimize **> **Page Speed**.
2. Click **Enable Page Caching**.![Enable w3 total cache in Platform i](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/inmotion-central-enable-w3-total-cache.jpg)
3. W3 Total Cache is now enabled. If you would like to explore more advanced options, you can click the **Open Dashboard **option.![Accessing W3 Total Cache in Platform i](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/inmotion-central-w3-dashboard.jpg)

## How to Optimize WordPress with W3 Total Cache

By default, WordPress is a dynamic **CMS** (Content Management System). This means that for every visitor request that WordPress has to process, it must first connect to the database to see if the requested page even exists.

In a lot of cases, this might not be problematic on a site that doesn’t receive much traffic. However, a sudden surge in traffic caused by search engine bots, or just a general increase in normal traffic can quickly cause your WordPress site to use up a lot of CPU resources from the server while trying to fulfill needless duplicate requests again and again.

You can counter this increase in CPU usage by implementing a caching plugin. What these do is cache the first visitor’s request of a new page to a plain HTML file on the server. Then, when another visitor comes through and requests the same page, so long as the page wasn’t updated in your administration section, or updated by a comment, the cached HTML page will be served.

This can greatly reduce CPU usage of your WordPress site very easily. As an example, let’s say you had 100 views of your front page. Without caching that would require the same database query to have to run 100 times, and every time it’s just getting back the exact same data anyway.

With a caching plugin, only the first user would have the database query run to generate the cached HTML file. Then, the next 99 visitors would get that cached HTML served to them immediately, without waiting for any database activity to complete.

This is almost always a win-win situation because your visitors don’t have to wait as long for your pages to load, and you’re reducing the impact of WordPress’s requests on the server’s performance.

Please note that database caching is not recommended for Shared Hosting, as this process is dependent on the server’s disk speed. Due to the nature of shared system resources, disk speed may be limited, and as such, database caching may adversely affect your site’s performance. We recommend experimenting with different caching techniques to see which works best for your site.

1. Install the [W3 Total Cache plugin](https://wordpress.org/plugins/w3-total-cache/) by *BoldGrid*.![Installing W3 Total Cache Plugin for WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/install-w3-total-cache.png)
2. From the left-hand menu, you should now have a new **Performance** section. Hover over this and click on **General Settings**.
3. Scroll down the general settings page, ensuring that the following section is enabled. Then, click the  **Save all settings** button.Page Cache:![Enabling WordPress Page Cache](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-page-cache.png)Minify:![Enable Minify in W3 Total Cache](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-minify.png)***NOTE**: If you are using minify, make sure to enable the option, save it and then immediately look at your WordPress site to make sure that the site looks normal. If you see problems with formatting, then it’s possible that a theme or plugin is causing issues due to the minification. You should then disable minification and not use this option with your website.*Opcode Cache (in this example, it was not available on my server): ![Enabling Opcode Cache](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-opcode-cache.png)Database Cache:![Turn Database Caching on](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-database-cache.png)Object Cache:![Turn Object Caching on](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-object-caching.png)Browser Cache:![Turn Browser Caching On](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-browser-cache.png)CDN (you must be subscribed to a 3rd party service):![Enabling CDN Service in W3 Total Cache](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/enable-cdn.png)
4. Hover over **Performance** again in the left-hand menu, and click on **Page Cache**.
5. Ensure that these options have a checkmark beside them, then click on **Save all settings**:**•** Cache front page**•** Cache feeds: site, categories, tags, comments**•** Cache SSL (HTTPS) requests**•** Cache 404 (not found) pages**•** Don’t cache pages for logged in users**•** Don’t cache pages for following user roles (only use this if you want to disable cache for specific roles)![Enable Page Cache](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/page-cache-settings.png)
6. Finally to confirm that you’ve set up everything correctly, in your web browser open up your site and hit **(Ctrl-U)**, or go to **View -> Page source** to view the source of the page. Scroll to the very bottom of the page and you should see the W3 Total Cache banner letting you know the page has been optimized.![W3 Total Cache Source](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/page-optimized-with-w3-total-cache.png)

## How to Clear WordPress Cache

**Clearing** your **WordPress cache** can be something you may need to do from time to time when using a [caching plugin to speed up WordPress](https://www.inmotionhosting.com/support/edu/wordpress/use-wordpress-cache-to-speed-up-your-site/). If you make changes to your WordPress site and don’t see the changes when visiting the updated page, you may need to clear your cache. This is because the caching plugin could still be showing the cached version of your page.

You can delete the cache to force your WordPress site to show your most recent changes immediately. Below are steps to clear the WordPress cache in the Dashboard and via WP-CLI.

### Clear Your Cache in the Dashboard

1. Login to your WordPress Dashboard.
2. Hover over **Performance**, then click **Dashboard**.
3. Click the **empty all caches** button.![Delete Server Cache](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/empty-all-caches.png)

### Clear Your Cache in WP-CLI

1. [Log in to SSH](https://www.inmotionhosting.com/support/server/ssh/how-to-login-ssh/) or [cPanel Terminal](https://www.inmotionhosting.com/support/edu/cpanel/how-to-launch-the-cpanel-terminal/).
2. [Navigate to your WordPress directory](https://www.inmotionhosting.com/support/website/where-to-upload-files/).
3. (Optional) Ensure W3TC is [installed](https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/install-a-plugin-using-wp-cli/) and active: wp plugin status w3-total-cache You should receive the plugin name and Active status.
4. To purge URLs within your content delivery network (CDN) and [Varnish](https://www.inmotionhosting.com/support/server/ssh/installing-and-configuring-varnish/) (if enabled): wp w3-total-cache cdn_purge
5. To flush other caches:`wp w3-total-cache flush *an-attribute-below*``all``posts` – page and posts cache`post` – page cache`database``object``minify`For example: wp w3-total-cache flush all

## How to Import or Export W3 Total Cache Settings

There may be times when you want to back up your settings or use them on a different site. Follow along, and we’ll walk you through importing and exporting your W3 Total Cache settings in the Dashboard. We will then show you how to import a settings file via WP-CLI.

### Import/Export Your Settings From the Dashboard

1. [Log in to your WordPress dashboard](https://www.inmotionhosting.com/support/edu/wordpress/logging-into-wordpress-dashboard/).
2. Under *Performance*, select **General Settings**.
3. At the bottom, export your settings by clicking the **Download** button.![Download Cache Settings](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/downoad-configuration-settings.png)
4. Import your settings by clicking the **Choose File** button to select your backup (.json) file. Then, click the **Upload** button.![Upload Settings](https://www.inmotionhosting.com/support/wp-content/uploads/2020/11/import-configuration.png)

### Import Your Settings with WP-CLI

1. [Upload the file](https://www.inmotionhosting.com/support/website/how-to-upload-files-server/) to your cPanel account.
2. [Log in to SSH](https://www.inmotionhosting.com/support/server/ssh/how-to-login-ssh/) or [cPanel Terminal](https://www.inmotionhosting.com/support/edu/cpanel/how-to-launch-the-cpanel-terminal/).
3. [Navigate to your WordPress directory](https://www.inmotionhosting.com/support/website/where-to-upload-files/).
4. (Optional) Ensure you’re in the correct directory: wp option get home && wp option get siteurlYou should receive your domain twice.
5. (Optional) Ensure W3TC is [installed](https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/install-a-plugin-using-wp-cli/) and active: wp plugin status w3-total-cacheYou should receive the plugin name and Active status.
6. Run this command: wp w3-total-cache import *file-path-to-filename*

---

Congratulations! You now know how to use the W3 Total Cache plugin to optimize your site’s performance. We recommend bookmarking our [WordPress Tutorials](https://www.inmotionhosting.com/support/edu/wordpress/) section for more helpful guides.
