• Resolved alyxleclaire

    (@alyxleclaire)


    Hi there,

    I am just starting to install this plugin and I can’t get passed this error when trying to turn on preview:

    wp-content/w3tc-config/master-preview.php could not be created, please run following command:
    chmod 777 /wp-content/w3tc-config/master-preview.php

    So far I have the file advanced-cache.php populated with the code the plugin said to include. The file permissions are 0644 owned by www-data

    The wp-content/cache folder is owned by www-data and has 2775 permissions
    Files inside are 0644 permission.

    The wp-content/w3tc-config is owned by www-data and has 2775 permissions. (I also tested with 777 permissions and it did not work)

    I created a file wp-content/w3tc-config/master-preview.php which is empty. It is owned by www-data and has 0644 permission. (I also tested with 777 permissions and it did not work)

    Note: I haven’t allowed the execution of the .htaccess file yet in apache config. I see that this plugin already put a lot of code in it. When i do allow .htaccess to be used, any page i go to i get an Internal Server Error. So it breaks my site.

    I am testing one thing at a time, so is there are way you could just tell me what code I need to put in to master-preview.php? Or help me create that file somehow.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @alyxleclaire

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    master.php is a config file meaning your entire settings of the W3 Total Cache is stored there.
    master-preview.php is the copy to those settings for preview mode and it can have from 800 up to 1000 or more lines(depending on the settings) and since it’s dependable on the user settings share the entire code.
    I’ve just tested this on a couple of instances and it’s running just fine. The wp-content and w3tc-config folder in my case are 0755, and master-preview.php is 0644. I suggest that you set the wp-content and w3tc-config folder permissions to 777 temporarily, delete the master-preview.php and reload /wp-admin/admin.php?page=w3tc_general
    See if the issue persists.
    As for the .htaccess possibly there is a conflict with some other rules or some other plugins so if you ar using any other caching plugin you should disable it or any other plugin that may cause the conflict.
    Also, make sure that define(‘WP_CACHE’, true); is defined in the wp-config.php
    Thank you!

    Thread Starter alyxleclaire

    (@alyxleclaire)

    Thank you so much for your explanation and helping me move in the right direction.
    After fixing conflicts in the .htaccess, and setting w3tc-config folder to 0755 and internal files to 0644, the preview button is working. My site loads when hitting that button.

    Now, how can I verify that the preview I am seeing was indeed a static HTML fetched from the W3 Total Cache’s Page Cache?

    That is, to verify that the page was not created with php and then delivered to me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘master-preview.php could not be created, runned chmod 777 already’ is closed to new replies.