I had some problems with nested upload dirs:
uploads/YYYY/MM/$filename
wp_filesystem->mkdir doesn't recurse (like mkdir -p) so I changed the plugin like this:
diff --git a/hugo-export.php b/hugo-export.php
index 5bde326..5651fd6 100644
--- a/hugo-export.php
+++ b/hugo-export.php
@@ -474,7 +474,9 @@ class Hugo_Export
// Make destination directory
if (!is_dir($dest)) {
- $wp_filesystem->mkdir($dest);
+ if (! wp_mkdir_p($dest)){
+ $wp_filesystem->mkdir($dest) or wp_die("Could not created $dest");
+ }
}
// Loop through the folder
I had some problems with nested upload dirs:
uploads/YYYY/MM/$filename
wp_filesystem->mkdir doesn't recurse (like
mkdir -p
) so I changed the plugin like this:To get it working