Home Forums ACF PRO Need to re-run DB upgrade


Need to re-run DB upgrade

  • My site was using an older version of WordPress that didn’t have the ‘termmeta’ table yet. I upgraded to ACF 5.5 and when it did the DB upgrade, it said it couldn’t update the termmeta table because it didn’t exist. Then I upgraded WordPress to 4.7.So basically, I should have upgraded WP before ACF.

    So issue now is that I need to run the DB upgrade again so that it can correctly copy the data over to termmeta. As it stands now, it is resulting in broken values for my fields. I no longer see the DB upgrade notification so can I somehow run it manually?

  • Hi @moettinger

    The easiest way to trigger the upgrade notice is to manually change the version in the database. You can search the option_name column in the wp_options table, then change the option_value to the version you have before it’s upgraded.

    Please don’t forget to backup your site and database first.

    I hope this helps 🙂

  • I was able to run the upgrade just how you suggested but my problem is persisting. I am using a repeater field and inside it, all my sub fields work except for those where I am using the image field to return a url. This used to work prior to 5.5 but now they break the page. The page just stops rendering once it gets to the url of the image.

    For example, when viewing source for my page, it ends at

    <a href="#module-logos"><img src="

  • Hi @moettinger

    It seems there’s a conflict there. Could you please set WP_DEBUG to true to see any error messages on the page? Please take a look at this page to learn how to set it:

    Also, could you please share the code you were using and the JSON export file of your field group so I can test it out on my installation?

    Thanks 🙂

  • This reply has been marked as private.
  • Hi @moettinger

    Could you please let me know which field group that has the issue? Could you also share your complete code? You can share it here:

    Also, could you please check the PHP error log on your server to see any related error messages? If you don’t know where to find it, kindly get in touch with your hosting.

    Thanks 🙂

  • This reply has been marked as private.
  • Hi @moettinger

    I’ve just tested it on my installation and found out that you are using a multisite installation. Could you please try to reproduce the issue on a single site instead? This will make sure that the issue is not the multisite setup.

    Also, could you please try the code for the “promo” field on one of the WordPress’ stock themes (like Twenty Sixteen) with only ACF activated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Could you also let me know the total row of the data? Could you please try it with a page that has only one row?

    Thanks 🙂

  • Finally figured this out.

    Somewhere in the beginning of the page, I was doing this to get the current blog’s name:

    <?php $current_site = get_blog_details(); echo $current_site->blogname; ?>

    That has always worked until I upgraded WP and ACF recently. Then all of the sudden, the issue of media not loading and blowing up the memory started happening.

    I finally found that removing this one line fixed the whole page so I rewrote it to this and now everything works:

    <?php global $blog_id; $current_blog_details = get_blog_details( array( 'blog_id' => $blog_id ) ); echo $current_blog_details->blogname; ?>

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Need to re-run DB upgrade’ is closed to new replies.