Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

W3 Total Cache Error WordPress: Causes and How to Fix It

W3 Total Cache Error WordPress: Causes and How to Fix It

Short answer

W3 Total Cache errors usually come from missing write permissions, rewrite rules the server is not using, leftover drop-in files from another cache plugin, an unavailable Redis or Memcached server, or minify settings. Match the message to its cause, fix it, then clear all caches.

Key takeaways

  • Permission errors mean the plugin cannot write to wp-content or wp-config.php.
  • Nginx needs the plugin's nginx.conf file included in the server block.
  • Only one plugin can own each caching drop-in file.
  • Choose Redis or Memcached only if your server really runs them.
  • Minify is the most common cause of a broken layout.

Why does W3 Total Cache show an error in WordPress?

W3 Total Cache shows errors when it cannot write its files, when server rewrite rules are missing, when a cache engine such as Redis is unavailable, or when its minify settings break your pages.

Most W3 Total Cache errors fall into a handful of groups. The message at the top of the dashboard usually names the file or setting involved, which tells you where to start.

Some problems do not show a message at all. A broken layout, a blank page or a login loop after turning on a feature is often W3 Total Cache too, even with no warning on screen.

This guide matches each common symptom to its cause and fix. Work through the section that matches what you see, and always keep a backup before changing files.

Symptom or messageLikely causeFirst fix
Files and directories could not be createdwp-content or wp-config.php not writableFix permissions or enter FTP details
Page cache URL rewriting is not workingRewrite rules missing from .htaccess or NginxAdd the rules shown by the plugin
nginx.conf not included or not writableNginx does not load the plugin's rulesInclude the file in your server block
Drop-in file already existsAnother cache plugin left files behindRemove the old drop-in
Cannot connect to Redis or MemcachedEngine not installed or wrong hostSwitch to disk or fix the server details
Layout broken after enabling minifyCombined CSS or JS breaking the pageTurn off minify, then exclude files
Critical error or white screenPHP fatal error in a plugin fileDisable the plugin by renaming its folder

How do you fix the files and directories could not be created error?

This error means W3 Total Cache could not create its cache folders, config folder or drop-in files because the web server does not have write permission in wp-content or on wp-config.php.

The plugin needs to write to wp-content, create a cache folder and a w3tc-config folder inside it, and add the WP_CACHE line to wp-config.php.

On many hosts, W3 Total Cache shows a form asking for FTP details so it can create the files for you. Entering them is a quick fix if you trust the connection.

The cleaner fix is to correct file ownership and permissions. The WordPress handbook on file permissions explains the usual settings, and our guide on setting correct file permissions in WordPress walks through it.

After fixing permissions, go back to the W3 Total Cache dashboard and use its button to retry or recheck the installation. The message should clear once every file exists.

Why does W3 Total Cache say WP_CACHE is not set?

W3 Total Cache warns about WP_CACHE when it cannot add the line that turns on advanced caching to wp-config.php, usually because the file is read-only or managed by your host.

You can add it by hand. Open wp-config.php over FTP or your host's file manager and add this line above the comment that says to stop editing:

define( 'WP_CACHE', true );

Make sure the line appears only once. A second WP_CACHE definition from an old cache plugin can trigger PHP warnings.

Some managed hosts lock wp-config.php or block page caching plugins. If your host does that, use its built-in caching instead and limit W3 Total Cache to features the host allows.

What does page cache URL rewriting is not working mean?

This message means the server is not using the rewrite rules W3 Total Cache needs to serve cached pages directly, so requests still go through PHP or fall back to slower caching.

On Apache and LiteSpeed, the rules live in the .htaccess file in your site root. If the plugin cannot write to it, it shows the rules for you to paste in yourself.

Copy the rules exactly as shown and place them above the standard WordPress block. Our guide on how to edit the .htaccess file in WordPress shows how to do this safely.

If rewrite still fails, the host may not allow .htaccess overrides, or mod_rewrite may be off. Ask your host to confirm both.

A simple workaround is to switch the page cache method to a basic disk option, which does not depend on rewrite rules. It is slightly slower but avoids the error.

How do you fix W3 Total Cache errors on Nginx?

On Nginx, W3 Total Cache writes its rules to an nginx.conf file in the site root, and you must include that file in your Nginx server block because Nginx does not read it on its own.

Nginx has no equivalent of .htaccess. That is why the plugin shows rewrite warnings on Nginx servers even when its file is written correctly.

Add an include line inside the right server block that points to the plugin's nginx.conf file, then test the configuration and reload Nginx. The Nginx include directive explains how includes work.

If you are on managed hosting without server access, you cannot add the include yourself. Ask your host to add it, or use the host's own page cache instead.

If the plugin says nginx.conf is not writable, create an empty file with that name in the site root and give the web server permission to write to it.

How do you fix drop-in file conflicts?

Drop-in conflicts happen when a file such as advanced-cache.php, object-cache.php or db.php in wp-content was created by another cache plugin, so W3 Total Cache refuses to overwrite it.

These files load before normal plugins and control caching at a low level. Only one plugin can own each file at a time.

First, deactivate and fully remove the other caching plugin. Then check wp-content over FTP and delete any leftover drop-in that belongs to it.

Open the file before deleting it. The header comment usually names the plugin that created it, so you do not remove one your host added on purpose.

Then return to W3 Total Cache and let it create its own drop-ins. Our guide on fixing plugin conflicts covers how to spot overlapping plugins in general.

Why can W3 Total Cache not connect to Redis or Memcached?

This error means you picked Redis or Memcached as the cache method, but the service is not installed, not running, or uses a different host, port or password than the plugin expects.

W3 Total Cache can show these engines as options even when your server does not support them. Choosing one that is not available causes connection errors and can slow the site down.

Ask your host whether Redis or Memcached is available and what the connection details are. Then enter those details in the plugin's settings for object cache or database cache.

If the service is not available, switch the method back to disk. For object caching, many sites do better without it than with a misconfigured engine.

Our guide on setting up Redis object cache explains how to connect and test it.

If you are unsure which engine to ask for, our comparison of Redis vs Memcached covers the differences.

Why did W3 Total Cache break my site layout?

A broken layout after turning on W3 Total Cache is usually caused by minify or combine settings changing the order or content of your CSS and JavaScript files.

Start by turning off Minify in the general settings and clearing all caches. If the layout returns, minify was the cause.

You can then turn it back on in stages. Try CSS only, then JavaScript only, and exclude the files that break the page.

Many sites already get minified files from their theme or a CDN. If that is true for you, leaving minify off costs very little speed and avoids most layout problems.

After any change, clear the W3 Total Cache cache and your browser cache. Our guide on how to clear W3 Total Cache shows each method.

How do you fix a critical error caused by W3 Total Cache?

If W3 Total Cache causes a critical error or white screen, disable it by renaming its plugin folder over FTP, then remove its drop-in files and the WP_CACHE line if the site still fails.

Here is the order to follow:

  1. Connect with FTP or your host's file manager.
  2. Rename wp-content/plugins/w3-total-cache to something like w3-total-cache-off.
  3. Reload the site to see if it works.
  4. If not, rename advanced-cache.php, object-cache.php and db.php in wp-content.
  5. Remove or set to false the WP_CACHE line in wp-config.php.

Turning on debug logging shows the exact file and line that failed. The handbook page on debugging in WordPress explains the settings, and our guide on fixing the critical error message covers the wider process.

Once you are back in, update W3 Total Cache to the latest version before turning it on again. Many fatal errors come from old versions running on newer PHP.

How do you reset W3 Total Cache settings?

You can reset W3 Total Cache from its settings by restoring the default configuration, or by deleting the w3tc-config folder in wp-content while the plugin is turned off.

A reset is useful when you have changed many options and no longer know which one caused the problem. It returns every feature to its default state.

Export your settings first if the plugin offers it. That way you can compare old and new settings or restore a working setup later.

After the reset, turn on only page cache and browser cache. Add other features one at a time and check the site after each change.

The plugin's page on WordPress.org and the W3 Total Cache support documentation list current features and setup notes.

How do you stop W3 Total Cache errors from coming back?

Keep W3 Total Cache updated, use only one caching plugin, turn on features one at a time, and test changes on a staging copy before applying them to your live site.

Most repeat errors come from stacking features. Page cache, browser cache and a CDN are enough for many sites, while database and object cache need the right server setup.

Watch for host changes. Moving to a new server or switching from Apache to Nginx changes how the plugin's rules work, so recheck its dashboard after any migration.

If W3 Total Cache keeps causing trouble, a simpler caching plugin or your host's built-in cache may serve you better. Our recommended W3 Total Cache settings guide shows a safer starting point.

Frequently asked questions

Is it safe to delete the W3 Total Cache cache folder?

Yes. The cache folder only holds generated copies of your pages and files, so deleting it does not remove content. The plugin rebuilds the cache as visitors load pages. Deleting the w3tc-config folder is different, because it resets your plugin settings.

Why does W3 Total Cache ask for FTP details?

It asks for FTP details when the web server cannot write the files it needs, such as cache folders and drop-ins. Entering the details lets it create them for you. Fixing file ownership and permissions removes the prompt for good.

Can I use W3 Total Cache with another cache plugin?

No. Running two page caching plugins causes drop-in conflicts, double caching and hard-to-trace errors. Pick one caching plugin, remove the others completely, and delete any leftover drop-in files they left in wp-content.

Should I turn on database cache in W3 Total Cache?

Usually not, unless your host recommends it and provides a fast engine such as Redis. Database caching to disk can slow a site down on shared hosting. Page cache and browser cache give most of the speed benefit.

How do I disable W3 Total Cache without the dashboard?

Connect through FTP or your host's file manager and rename the w3-total-cache folder inside wp-content plugins. WordPress then treats the plugin as deactivated. Also rename its drop-in files in wp-content if the site still shows errors.

Sources

  1. W3 Total Cache WordPress.org Plugins
  2. W3 Total Cache documentation BoldGrid
  3. File permissions WordPress Developer Resources
  4. Debugging in WordPress WordPress Developer Resources
  5. Core functionality: include nginx.org

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.