• Resolved Rajeev Rajan

    (@rajeevrf)


    I am using Local Directory settings for deployment and I turned on the “Clear Directory” option in “Additional Settings”.
    So, when I generate Static files, files are getting updated in the configured local directory but its not clearing out the local directory before storing/updating the files there.

    For example, I deleted a post “Hello World” and added a new post “Another Hello World” in WP. This action should delete the “Hello World” static folder and add new “Another Hello World” static folder with the “Clear Directory” setting turned on. But, its creating the “Another Hello World” static folder but not deleting the “Hello World” static folder which we deleted in WP.

    I checked the Diagnostics page. It has all writing permissions needed by plugin.

    Let us know the fix for this.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author patrickposner

    (@patrickposner)

    Hey @rajeevrf,

    thanks for pointing that out.

    That is indeed a bug in Simply Static.
    I fixed it now and will push an update in the next few minutes!

    Cheers,
    Patrick

    Thread Starter Rajeev Rajan

    (@rajeevrf)

    Thanks!

    Thread Starter Rajeev Rajan

    (@rajeevrf)

    Hi @patrickposner ,

    Thanks for the quick response. Now the functionality works as expected.

    One more question: I have an .htaccess file, robots.txt file and a custom folder(not being generated from WP) inside this root folder.

    Is there a way to Clear the Entire folder except couple of files and folders?

    TIA

    Plugin Author patrickposner

    (@patrickposner)

    Hey @rajeevrf,

    right now, we can’t handle that.

    Maybe it’s good to handle that from a different angle – clear the directory, export the static files and THEN add these files back into the directory?

    There is an action triggered once all files are deployed to the local directory that you can use for that:

    add_action('ss_finished_transferring_files_locally', function( $local_dir ) {
    // Get your files and move them to $local_dir.
    });
    Thread Starter Rajeev Rajan

    (@rajeevrf)

    Thanks, I will try this out!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Deployment Local Directory – Clear Directory Not Working’ is closed to new replies.