Doing a BackupBuddy backup from the commandline using WP CLI on a GoDaddy server the other day I ran into a fatal error. A WP CLI Call to undefined function apply_filters() error to be precise. It did not allow me to backup from the command line at all. The site was running fine.

Anyways, the error I got running the command:

wp backupbuddy backup 2

was the following one:

Fatal error: Call to undefined function apply_filters() in /home/user/public_html/wordpress/wp-includes/load.php on line 317

Troubleshooting

Googling the issue I found out that many websites were displaying similar issues. And no solutions really but to remove the core files and replace them with a fresh set or turning off all plugins and checking if that helps. The basics. But then I stumbled upon this SO thread. There the suggestion was to see if wp cli could be updated. And then I remembered wp cli having some issues with Trellis and WordPress 4.6. And I thought, yeah, that could be it!

Updating WP CLI to 0.24.1

So I ran the updater using the following command:

wp cli update

and it worked updating it all:

 wp cli update

You have version 0.22.0. Would you like to update to 0.24.1? [y/n] y

Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar...

New version works. Proceeding to replace.

Success: Updated WP-CLI to 0.24.1

WP CLI BackupBuddy Re-Run

After that I ran the command to backup the site again:

wp backupbuddy backup 2

It did not spit out the same error again, but it did take its sweet time showing some feedback. After like 2 minutes it mentioned zip functionality it could not find as usual and then proceeded to do the backup.

Happy ending!

NB Reasons for using wp cli for BB backups on GoDaddy and installation instructions are mentioned here if you need them.

Leave a Reply

Your email address will not be published. Required fields are marked *