Fix Autoptimize cannot write to the cache directory (wp-content/cache/autoptimize/)

By | March 20, 2023

When we are using wordpress autoptimize plugin, we may get this error: Autoptimize cannot write to the cache directory (wp-content/cache/autoptimize/). In this tutorial, we will introduce you how to fix it.

Step 1: Check cache/autoptimize permission

You can read this tutorial to update cache folder permission to fix this error.

Fix WordPress Autoptimize and W3 Total Can not Write Cache Folder Error: A Beginner Guide – WordPress Tutorial

However, if you have changed the permission, this error also exists, you can read step 2.

Step 2: Check the autoptimize last modified time

Sometimes, there exists an autoptimize folder, this folder may created by other version Autoptimize plugin. For example:

delete autoptimize folder

We can delete or rename this file, Autoptimize plugin will create a new one.

Finally, you will find this error is fixed.