How to fix an error message displayed in LiteSpeed Cache

lsce001.png

I get the error message "LiteSpeed Cache was unable to write to your wp-config.php file. Please add the following to your wp-config.php file located under your WordPress root directory: define('WP_CACHE', true);" If so, please follow the steps below.

*The cache will not be enabled if the error is displayed.

STEP1: Login to cPanel

Please refer to this article for details.

STEP2: Open File Manager

After logging into cPanel, open File Manager.

lsce020.png

STEP3: Open wp-config.php

Open the directory where WordPress is installed (directly under "public_html" for the initial domain), select the file labeled "wp-config.php", and click "Edit" at the top of the screen.

lsce030.png

If you get a warning, press the button labeled "Edit".

lsce040.png

STEP4: Find the target description

Find the following line at the bottom of the file:

/* That's all there is to editing! Enjoy your blog with WordPress. */

Or it may be written in English like this:

/* That's all, stop editing! Happy blogging.

lsce005.png

STEP5: Edit code

Just above that line, write the following code:

define('WP_CACHE', true);

lsce006.png

STEP6: Save the file

Press the "Save Changes" button in the upper right to save and close.

lsce007.png

Related article

How to speed up with LiteSpeed Cache in WordPress

Was this article helpful?
1 out of 2 found this helpful