0

I'm trying to create a function in functions.php or a plugin to generate an export via a cronjob, similar to how Chris_O did this question. However it seems that I can't call export_wp(), I keep getting:

Fatal error: Call to undefined function export_wp() in wherever-I-call-it-from.php on line 686

Can someone tell me how to call that function?

2

The function lives in wp-admin/includes/export.php and is only included on the export admin page (see source).

If you want to use it on other pages, you'll have to include it manually:

require_once( ABSPATH . 'wp-admin/includes/export.php' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.