wp-super-cache security issue (wp-content writable?) (11 posts)

  1. fkranjce
    Posted 9 years ago #


    After many problems with CPU load of my server i've instaled wp-cache and it works great. CPU load is down and site works extra fast.

    I have jsut two questions.

    I've look cached html files and i see adsense script is intact so i guess it shoudl work fine and google wont have any problesm with cache.

    Second is about security. Wp-cache require 777 permision on content folder and i am jsut wondering if it is possible to change that and keep wp-cache working. I dont feel safe with 777 permision on that folder.

    Thank you for any help.

  2. dj-primat
    Posted 8 years ago #


  3. huckmag
    Posted 8 years ago #

    bump for this. I just got spam files added to my wp-content folder and I'm pretty sure it's because of chmodding it to 777 for wp super cache.

    Any help on this?

  4. The content folder does not need to be 777. The cache folder does.

  5. huckmag
    Posted 8 years ago #

    If I set the wp-content folder to 755 then in the wordpress admin section the page for wp Super cache displays:

    Error: wp-content directory (/hsphere/local/home/huckftp/huckmagazine.com/wordpress/wp-content) is not writable by the Web server.
    Check its permissions.
    Cannot continue... fix previous problems and retry.

  6. Well, that really sucks. Seems like an error in WP-Super-cache to me. It should not require that wp-content be writable, it should only require that the config file be writable (since that's all it's writing to).

  7. huckmag
    Posted 8 years ago #

    I *think* it's still caching OK but the admin is not available.

  8. MindStar
    Posted 8 years ago #

    Once you have WP_Super_Cache installed and operational, you can CHMOD wp-content back to 755 (to protect your plugins folder).

    You will need to modify the wp-super-cache/wp-cache.php file to remove the check to see if wp-content is writable.

    Comment out lines 723-726

    if ( !is_writable($dir)) {
    	echo "<b>Error:</b> wp-content directory (<b>$dir</b>) is not writable by the Web server.Check its permissions.";
    			return false;
  9. huckmag
    Posted 8 years ago #

    The new version of Super Cache now displays the admin page even if you have wp-content at 755 but it is read only.

    I now change it to 777 when I need to clear the cache or make changes in admin and change it back.

    The new version is 0.5.4 and can be downloaded from

  10. Jeremy Clarke
    Posted 8 years ago #

    I have to say: Still, WTF? The only file that needs to be edited to change the settings is wp-cache-config.php, so why should people change the permissions on both that AND wp-content when they want to change settings, rather than just wp-cache-config?

    If Donncha is around, I'm interested to hear the reasoning, is there something we're missing? I guess we should just learn to edit the wp-cache-config.php file manually?

  11. myhelipad
    Posted 8 years ago #

    I just install WP Super Cache 0.6.5 and running smooth but having warning when i check back on WP Super Cache Manager

    Cache contents

    Warning: Invalid argument supplied for foreach() in /home/xxxxxxx/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 942

    pls advice.


Topic Closed

This topic has been closed to new replies.

About this Topic