921Forcing a Database Upgrade in ACF/WordPress


A site that was developed some years ago with WordPress 4.x and ACF 4.x got moved to a new server. During the migration process, WordPress and the Plug-ins were updated to their latest version – I assume, before the MySQL DB got migrated, which let to the following complaint:

“ACF are not showing in ACF 5.x”

After some detective work, I realise that the data was still present. ACF v4.x was storing the ACF data in wp_options, ACF v5.x is storing it in wp_termmeta.

Which is great, because all that is needed, is to update the DB! But how to do it?

First attempt: Re-install ACF 4.4.12, then update to ACF 5.x

Didn’t work as expected.

Second attempt: change the acf_version in wp_options

In the wp_options, the acf_version is set to the current WP version, 5.7.6 in this case. Setting it to 4.4.12, triggered the ACF DB update script, the ACF data got migrated to wp_termmeta, the site is working again as expected.

Shout out to the ACF Support Pages for solving the last piece of the puzzle.

98PHP-cgi wrapper

http://wordpress.org/support/topic/217411 http://www.pair.com/support/knowledge_base/authoring_development/system_cgi_php-cgiwrap.html