4

I have a migration script I'm using to copy my production environment to a dev server. Essentially it copies the files, exports/imports the MySQL database (using the wp db export and wp db import syntax), and then I'm using WP-CLI to deactivate and uninstall wordfence and w3-total-cache so they don't interfere with my development environment. I also have a list of files to remove to completely clean up those plugins. The whole script works great on one of my servers, but on another server I get the following error:

PHP Fatal error: Call to undefined function apply_filters() in /[path]/wp-includes/load.php on line 317

Both servers are seemingly identical. I'm managing them both with serverpilot.io, both are the same version of Ubuntu on Digital Ocean.

Has anyone seen this before?

P.S. I don't think it's relevant since the same setup is working on another server, but I'm calling the specific PHP version I want and executing the wp-cli.phar with --path defined, like so:

/opt/sp/php5.6/bin/php /usr/local/bin/wp-cli.phar plugin uninstall --deactivate wordfence w3-total-cache --path="$DEVDIR/public"

3
  • Have you updated to latest version?
    – wpclevel
    Aug 25, 2016 at 23:32
  • @Dan9 wow, can't believe I didn't try that! that seems to have fixed it. I am getting warnings still, but it works!
    – bhamrick
    Aug 25, 2016 at 23:44
  • Have you tried looking up what the contents of $DEVDIR are? Like: echo "${DEVDIR}" – also note the quotes in case you got spaces in there?
    – kaiser
    Sep 11, 2016 at 13:16

0

Browse other questions tagged or ask your own question.