• Resolved traderjohnroberts

    (@traderjohnroberts)


    Using version 1.23.16 of Updraft Plus, attempting to backup fails halfway through. The log shows a fatal PHP error:

    PHP Fatal error (Error) has occurred. Error Message: Call to undefined function get_main_site_id() (Code: 0, line 3059 in /home/strateg1/public_html/wp-content/plugins/updraftplus/backup.php)

    I’ve tried deleting Updraft plugin in WordPress and manually deleting the plugins/updraftplus directory, and reinstalling fresh, but it makes no difference.

    Here is the full log:

    https://drive.google.com/file/d/1c27gCO9sAxq8vIw0hld_8XNfSFEPIHx3/view?usp=sharing

    Does anyone know the solution to this problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor bcrodua

    (@bcrodua)

    Hi,

    The log shows that you have a Multisite WP install. In order for UpdraftPlus to work in a Multisite environment you need to have the Multisite/Network add-on.

    Thanks,
    Bryle

    Thread Starter traderjohnroberts

    (@traderjohnroberts)

    Okay, I didn’t think of that because UpdraftPlus (old version) was working on my multisite up until March ’23. I just recently noticed my weekly automatic backups had stopped 10 months ago!

    But thanks for the solution, cheers.

    Thread Starter traderjohnroberts

    (@traderjohnroberts)

    No, I spoke too soon. :-/

    I purchased and installed multisite addon and I still get the same error.

    The new log is here:

    https://drive.google.com/file/d/1_DnyJCn2ktZi1NoTjcIIU2bWDpXSDEGA/view?usp=sharing

    Do you have a solution?

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    Sorry for this problem – it turns out that UpdraftPlus introduced a use of a function that did not exist before WordPress 4.9, whereas you are using 4.8. We have fixed this for our next release. You can work around it by either downgrading to a previous UpdraftPlus version, or editing the file wp-content/plugins/updraftplus/backup.php and removing the whole line that has get_main_site_id on it.

    David

    Thread Starter traderjohnroberts

    (@traderjohnroberts)

    Thanks, that solution worked. I wanted to backup before updating WordPress in case the upgrade broke something on the site.

    For the benefit of anyone with the same problem; I commented out the line calling get_main_site_id() in plugins/updraftplus/backup.php, and sure enough, was able to run a complete backup.

    Then updated WordPress (and everything was okay), uncommented the line, and tested backup again, and it’s fine.

    So, my issue is now resolved. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Fatal error – Backup fails halfway through’ is closed to new replies.