Some times in WordPress you may get a confusing error for a particular plugin stating:
Plugin cannot write to the cache directory
This particular error is a file / folder permissions error and you need to make some changes to your WordPress folder permissions to fix it.
You have different options to change the folder / directory permissions of your WordPress website:
- Changing folder permissions from your Web Hosting Control Panel
- Changing permissions with an FTP client
The best way to go about it is to change the permissions through the FTP client. It gives you more control over your website’s directory structure and allows you to change multiple files / folders in one go.
How to Fix the Error:
To fix this error, you need to change your WordPress folder and sub-folder permissions to 755.
755 means that the Owner of file folder / file has the permission to Write / Delete the folder and other users can Read and Execute the files / folders.
Follow this step-by-step procedure to fix file and folder permissions to fix the Cache directory error:
- Open up your FTP client and login to your Website’s ftp server. For this guide we will be using FileZilla client to make the changes.
- Once you have logged into to your Web server in the FTP client, select the three folders from the listing: wp-admin, wp-content, wp-includes, right-click and select File Permissions.
- In the File Permissions, enter the value 755 in the “Numeric value” box. Then check the Recurse into Sub-directories option and select Apply to Directories only.
And you’re good. It will take a while to update the permissions of all the folder and sub-folders inside the WordPress folders tree. When it’s done, you can refresh your WordPress Dashboard and check if the error appears or not.
If you did everything exactly as shown here, the error should be gone now and the Plugin settings should be accessible.