Title: Upgrade database failed
Last modified: September 1, 2016

---

# Upgrade database failed

 *  Resolved [jpartin94](https://wordpress.org/support/users/jpartin94/)
 * (@jpartin94)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/)
 * I’m upgrading a site and the popup maker keeps coming up with a notification 
   bar saying it needs to update database but when I run it, it fails within seconds.
   
   Any ideas or things I can check?
 * Screenshot here [http://tinypic.com/r/28sn49i/9](http://tinypic.com/r/28sn49i/9)
 * [https://wordpress.org/plugins/popup-maker/](https://wordpress.org/plugins/popup-maker/)

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

 *  [waltmesser](https://wordpress.org/support/users/waltmesser/)
 * (@waltmesser)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696143)
 * I believe this is what you are looking for:
 * [Why does my resume upgrade always fail?](http://docs.wppopupmaker.com/article/135-i-see-a-notice-saying-resume-upgrade-but-it-always-fails)
 * Let us know if that helps!
 *  Thread Starter [jpartin94](https://wordpress.org/support/users/jpartin94/)
 * (@jpartin94)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696296)
 * I have tried this and refreshed about 100 times and it doesn’t disappear.
    Let
   it sit for 10 minutes and refreshed more. No such luck. Any other ideas?
 * Thanks!
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696305)
 * [@jpartin94](https://wordpress.org/support/users/jpartin94/) – If you added that
   line to your functions.php properly (assuming it actually gets executed) then
   the notices should gone or reset.
 * Once you run that it clears stuck upgrades. Try running it again (after removing
   that code) and see if it finishes this time.
 *  Thread Starter [jpartin94](https://wordpress.org/support/users/jpartin94/)
 * (@jpartin94)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696321)
 * Is there a way that I can confirm it executes? I added it to the functions.php
   just like I normally add other pieces of code and it didn’t break anything or
   give me any errors.
 * I did try running it again after removing the code and it still starts and then
   within a second it fails just like the screenshot in the first post there.
 * Thanks for the help! It works great on a separate mobile version of this site
   just having a heck of a time on the desktop site. They are different WordPress
   installs the other one being an older version of WordPress would that make a 
   difference?
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696343)
 * [@jpartin94](https://wordpress.org/support/users/jpartin94/) – If you edit a 
   popup do you see the new conditions editor (add / remove style) or the old wall
   of checkboxes? Also do you see the 2 new interfaces for Triggers & Cookies? If
   so then the migration already completed.
 * There is only 2 reasons that notice shows, either it partially completed which
   should be cleared up by using the detele_option code your using, or the upgrade
   still needs to process, in which case we can likely manually override it and 
   you can manually convert your popup settings if they didn’t get converted.
 * This is the first I have seen this so wondering if its something like object 
   caching in your server. For instance our store totals don’t recalculate properly
   unless we disable WP Engines Object caching. Similar could be ocuring here.
 *  Thread Starter [jpartin94](https://wordpress.org/support/users/jpartin94/)
 * (@jpartin94)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696344)
 * I believe it’s the new one? See shots below for reference.
    editing popup [http://tinypic.com/r/xcrfxw/9](http://tinypic.com/r/xcrfxw/9)
   trigger options [http://tinypic.com/r/fkqv84/9](http://tinypic.com/r/fkqv84/9)
 * If we can’t use it that’s ok, we just have it on the other versions of the site
   and it’s worked very well so we’d like to keep it the same if possible.
 * I have this same plugin on other sites hosted on the same server and even in 
   the same Cpanel account so if it was an object caching problem on the server 
   wouldn’t it affect all the sites?
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696345)
 * [@jpartin94](https://wordpress.org/support/users/jpartin94/) – Nope, those are
   the old interfaces, meaning that the migration didn’t complete. Can you check
   error logs to see if its throwing an error that we can debug?
 * How many popups do you have? If you only have a couple then manual migration 
   isn’t to difficult.
 * New interfaces look like this for reference: [http://docs.wppopupmaker.com/article/39-creating-a-popup](http://docs.wppopupmaker.com/article/39-creating-a-popup)
 * Check out the screenshots there and you will see that we no longer have boxes
   for each trigger (Auto Open, exit intent etc). Now they are all in one simplified
   smaller interface that adds a lot more flexibility.
 *  Thread Starter [jpartin94](https://wordpress.org/support/users/jpartin94/)
 * (@jpartin94)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696373)
 * So I’ve successfully completed the upgrade and it looks to be all kosher.
 * I enabled debug mode, ran the upgrade again and looked at the error log which
   showed me this:
 * [25-Aug-2016 14:02:16 UTC] PHP Fatal error: Call to a member function sanitize_fields()
   on a non-object in /home/aquabag/public_html/wp/wp-content/plugins/popup-maker/
   includes/class-pum-conditions.php on line 154
 * Looking at that file it’s calling I see this command:
    return $this->get_condition(
   $condition[‘target’] )->sanitize_fields( $condition );;
 * By modifying I was able to get it to work.
 *  return $this->get_condition( $condition[‘target’] );
 * Let me know if taking that piece out is a problem or what the best action would
   be but I did put it back after the upgrade completed. Maybe manual clean up is
   in order?
    Now I see all the new stuff like in the link you added on the last
   post.
 * Thanks for all the help!
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696384)
 * [@jpartin94](https://wordpress.org/support/users/jpartin94/) – Not a problem 
   glad you found it. Wonder why its throwing that error for only you / your site.
 * In any case just double check your popups & their conditions since that is where
   the issue was. If they look correct then your all set.
 * Once you run those upgrades they will never be needed again so its safe to put
   it back the way it was, it will never be accessed again.
 * Please take a moment to click that it [Works](https://wordpress.org/plugins/popup-maker/#compatibility)
   and to [rate and review the plugin](https://wordpress.org/support/view/plugin-reviews/popup-maker?rate=5#postform)
   or support.

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

The topic ‘Upgrade database failed’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

## Tags

 * [database upgrade](https://wordpress.org/support/topic-tag/database-upgrade/)
 * [upgrade failed](https://wordpress.org/support/topic-tag/upgrade-failed/)

 * 9 replies
 * 3 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/upgrade-database-failed/#post-7696384)
 * Status: resolved