• Resolved Devin104

    (@devin104)


    Your Plugin is sending me the following message:

    The request to write the file /srv/htdocs/wp-content/advanced-cache.php failed. Please check file and directory permissions on the file paths up to this point, and your PHP error log. 1. Please navigate, via FTP, to the folder – /srv/htdocs/wp-content 2. Edit or create a file with the name advanced-cache.php 3. Copy and paste the following lines into the file:

    For us novices in such matters could you kindly provide step-by-step instructions in terms the lay person can understnd on how I am to do this?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • This error happens because WP-Optimize needs to write to the advanced-cache.php file to enable caching, but it doesn’t have the necessary permissions.

    To fix the issue, use an FTP client or your hosting File Manager to access your site files. Navigate to /wp-content, create a file named advanced-cache.php (if it doesn’t exist), and set permissions to 644. Open the file and paste this:

    <?php
    // WP-Optimize Cache
    if ( ! defined('ABSPATH') ) {
    exit; // Exit if accessed directly
    }

    Save the file, ensure caching is enabled in WP-Optimize, and you’re all set! If errors persist, check permissions or contact your host for assistance.

    Thread Starter Devin104

    (@devin104)

    I am a novice with FTP client or Hosting File Manager including how to navigate to /wp-content or to create a file named advanced-cache.php and set permissions to 644.

    I would need step-by-step instructions in order to do so.

    As an alternative, would it work if I used the Code Snippet Plugin to enter this code:

    <?php
    // WP-Optimize Cache
    if ( ! defined('ABSPATH') ) {
    exit; // Exit if accessed directly
    }

    Thank you

    wpmansour

    (@wpmansour)

    Unfortunately, using the Code Snippet Plugin won’t work because the advanced-cache.php file needs to be physically present in your site’s filesystem for caching to function correctly. Here’s a step-by-step guide to resolve the issue and create the advanced-cache.php file. Don’t worry—it’s straightforward even if you’re new to this!

    Use Your Hosting File Manager:

      • Log in to your hosting account and open the File Manager.
      • Navigate to the wp-content folder.
      • Check if advanced-cache.php exists. If not, create a new file with that name.
      • Open the file and paste this code:
      <?php
      // WP-Optimize Cache
      if ( ! defined('ABSPATH') ) {
      exit; // Exit if accessed directly
      }
      • Save the file and set permissions to 644.
      • Finally, Enable Caching in WP-Optimize: Go to your WordPress Dashboard > WP-Optimize > Cache and make sure caching is turned on.

      If you run into any issues, feel free to ask for further assistance

    Viewing 3 replies - 1 through 3 (of 3 total)
    • You must be logged in to reply to this topic.