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"
$DEVDIR
are? Like:echo "${DEVDIR}"
– also note the quotes in case you got spaces in there?