How to restore from a .sql backup?

Pretty new to wordpress. currently using CPanel.

Recently a site crashed after an update, I have a backup I want to restore.

Its a .sql file. Upload goes fine until at line 31 I get error 1050;

Error: The system failed to execute the database script with the following errors: ERROR 1050 (42S01) at line 31: Table ‘wp\_actionscheduler\_actions’ already exists

​

The table doesnt exist. I am starting from a blank database…

What do?

2 Comments
  1. It seems there’s an attempt to create the table twice. Need to open the sql file with an ordinary text editor (like notepad++) and inspect the syntax for stuff like this. Look at this [StackOverflow question]). This is [another article]) addressing CPanel specifically.

  2. Did you delete all tables from the database before uploading the new one? If they already exists, you cant overwrite them

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer