Unexpected notices and warnings after WP migration

(Disclaimer: I’ve been through the documentation for how to migrate WP to a new server, so please don’t refer me back to it. happy! )

The Webmaster for a website recently passed away, and I’ve been given the fun task of migrating to a new server as the site owner changes host.
It is a heavily customized WP site.

After migrating to the new server, the website looks good except for some breakage that I’m having a hard time tracking down.
When I changed define(‘WP_DEBUG’, false); to true , a whole lot of errors, notices and warnings appeared. I was able to fix the errors, but the notices and warnings are a mystery because they don’t seem to apply to files and code that they’re referencing.

There are a lot of undefined variables , undefined indexes , and then this one:

Warning: Use of undefined constant CURL_HTTP_VERSION_2_0 - assumed 'CURL_HTTP_VERSION_2_0' (this will throw an Error in a future version of PHP) in...

I’ve checked the files, and all variables and indexes are certainly defined.

The big thing I wonder about is why this didn’t happen on the original server? The migration was just a routine task, and the site should have worked from the start. I even tried changing PHP versions on the server, but no change.

I’d greatly appreciate any suggestions or help on this. Thanks in advance!

Are you running the same versions of PHP on the old and the new sites?

Yes, the PHP version is fine.

That error looks like the constant is not defined which would lead me to believe curl isn’t installed as a php extension. For larger projects there can be extensions that are installed that can easily be missed when conducting migrations.

More modern languages like node have mostly fixed with problem with deoendency management solutions more sophisticated than php.

Also environment configuration can be better managed using containerization. I’m not a fan of containers but for older monlithic apps they make sense. I much prefer to avoid servers entirely and use serverless development but that isn’t an option with a Wordpress site.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.