Title: Fatal error on restore
Last modified: April 6, 2018

---

# Fatal error on restore

 *  Resolved [lakenjr](https://wordpress.org/support/users/lakenjr/)
 * (@lakenjr)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-on-restore/)
 * As a test, I ran a database backup and then tried to restore from it. Received
   the following message when trying to restore. I am running WordPress 4.9.5 with
   PHP version: 7.0.29
 * **Fatal error:** Uncaught Error: Call to undefined function mysql_connect() in/
   home/jetlagan/public_html/wp-content/plugins/wp-database-backup/includes/admin/
   class-wpdb-admin.php:240 Stack trace: #0 /home/jetlagan/public_html/wp-includes/
   class-wp-hook.php(286): WPDB_Admin->wp_db_backup_admin_init(”) #1 /home/jetlagan/
   public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, 
   Array) #2 /home/jetlagan/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(
   Array) #3 /home/jetlagan/public_html/wp-admin/admin.php(156): do_action(‘admin_init’)#
   4 /home/jetlagan/public_html/wp-admin/tools.php(10): require_once(‘/home/jetlagan/…’)#
   5 {main} thrown in /home/jetlagan/public_html/wp-content/plugins/wp-database-
   backup/includes/admin/class-wpdb-admin.php on line 240

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

 *  [Prashant Walke](https://wordpress.org/support/users/walkeprashant/)
 * (@walkeprashant)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-on-restore/#post-10161301)
 * Hi,
 * Replace mysql_connect function with mysqli_connect
 * As well as you can restore backup manually.
 * 1)Login to phpMyAdmin
    2)Click Databases and select the database that you will
   be importing your data into. 3)Across the top of the screen will be a row of 
   tabs. Click the Import tab. 4)On the next screen will be a location of text file
   box, and next to that a button named Browse. 5)Click Browse. Locate the backup
   file stored on your computer. 6)Click the Go button
    -  This reply was modified 8 years, 1 month ago by [Prashant Walke](https://wordpress.org/support/users/walkeprashant/).
 *  [Feznizzle](https://wordpress.org/support/users/feznizzle/)
 * (@feznizzle)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/fatal-error-on-restore/#post-10291405)
 * Hi Prashant,
 * I’m having the same problem, so I think the answer above would apply to me. Only,
   I can’t find the setting for mysql_connect so that I can replace it.
 * Can you please tell me where that setting is?
 * Thanks!
 *  [Feznizzle](https://wordpress.org/support/users/feznizzle/)
 * (@feznizzle)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/fatal-error-on-restore/#post-10291527)
 * After posting, I took a guess that you were suggesting that we alter the php.
 * So I went into:
    /wp-content/plugins/wp-database-backup/includes/admin/class-
   wpdb-admin.php
 * And made the change on line 240, replacing mysql_connect function with mysqli_connect.
 * This threw a subsequent error, “Fatal error: Uncaught Error: Call to undefined
   function mysql_select_db()…. thrown in /wp-content/plugins/wp-database-backup/
   includes/admin/class-wpdb-admin.php on line 242”.
 * My guess is that mysqli_connect is not active on my server and, frankly, I’m 
   going to go ahead and give up on this. It’s not worth the extra effort and my
   trust in your process is shot anyhow.
 * Shame, really. Seemed like such a handy little tool, being able to quickly backup/
   restore while developing.
 * I’ll monitor this thread, just in case you post a better solution.
 * Thanks!
 *  [Prashant Walke](https://wordpress.org/support/users/walkeprashant/)
 * (@walkeprashant)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-on-restore/#post-10803959)
 * Hi,
 * we have resolved issue in latest version i.e 4.6.3.
 * Please update your plugin and let me know in case any issue.

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

The topic ‘Fatal error on restore’ is closed to new replies.

 * ![](https://ps.w.org/wp-database-backup/assets/icon-256x256.png?rev=2838048)
 * [WP Database Backup - Unlimited Database & Files Backup by Backup for WP](https://wordpress.org/plugins/wp-database-backup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-database-backup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-database-backup/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-database-backup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-database-backup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-database-backup/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Prashant Walke](https://wordpress.org/support/users/walkeprashant/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-on-restore/#post-10803959)
 * Status: resolved