Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Call to undefined function WP_Filesystem() #24

postblue opened this Issue Jun 17, 2013 · 3 comments


None yet
4 participants

The script fails to export my Wordpress 3.5.1 install (considering a nice export for a future Jekyll site) : Debian Wheezy is up-to-date, with PHP 5.4.16 from DotDeb and MariaDB 5.5.31 from MariaDB repositories.

php jekyll-export-cli.php > jekyll-export.zip
PHP Fatal error:  Call to undefined function WP_Filesystem() in /var/www/wordpress/wp-content/plugins/wordpress-to-jekyll-exporter/jekyll-export.php on line 237

I don't know where to search for a fix.

I fixed this by adding the following include to jekyll-export-cli.php after the existing one:

include "../../../wp-admin/includes/file.php";

jhabdas commented Sep 15, 2013

Thanks @jeffbarr that worked for me too. I submitted a pull request with your fix: #26.

I had to resort to CLI as the plug-in ultimately continued to spit output to the client in an http response rather than creating a zip file despite attempts to upgrading php, tweak config to get the plug-in working from the admin dashboard.

Debugging info

  • Couldn't activate plug-in until I toggled over to PHP 5.3 (done from cPanel with BlueHost)
  • Once activated the plug-in continued to output zip file contents back to browser
  • No zip files were written when using the plug-in from the admin panel in WP 3.5.2 with shared hosting
  • Attempts were made to modify php.ini to allow zip file creation with php scripts (set chmod 755), such as adding extension=zip.so and trying to set-up the temp directory, adding upload_tmp_dir as well
  • Received error reported in this bug after attempting to run plug-in from CLI
  • Applying the suggested fix here resolved the bug and created my first non zero-byte jekyll-export.zip

benbalter commented Apr 28, 2014

Fixed via #26. Thanks! 🎉

@benbalter benbalter closed this Apr 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment