Yep, did it... I mistakenly deleted a form from Contact Form 7. It had to be restored it, or build it all over again from scratch. Here is how I restored that contact form.

How to Restore a Deleted Contact Form from Contact Form

At first you may think it is no big deal to rebuild a contact form, but this one was complicated. This form was a 4 step application using Contact Form 7 - Dynamic Text Extension and Contact Form 7 Multi-Step Forms that took 3 days to build, then "poof", deleted it by accident.

Doing a site restore to a previous date before I deleted it did not work, so I thought I was out of luck.

Thinking it was gone forever and would have to create another one, I gave it one last shot and did a little research to see if/how I could restore it, though I could not find a real solution. Digging a bit and putting all that information together, eventually it was restored.

However, this is not my specialties, so if anyone see's if I did something wrong and/or that could have been done it differently, please chime in on the comments and let me know.

Here is how I restored a deleted form from Contact Form 7.

The directions below are for BlueHost, but regardless of who you are hosting your website with, the cPanel should look similar. Also, if you are not backing up your website on your host, this will not work for you. as in this case, we were using Site Back Up Pro.

I am also using ManageWP. If you are using the free back up that they offer, you could also use that as well. Bottom line is you will need a back-up.

So, whatever you are using to back up your website, you will want to be able to access your database files. That is because the old form that was deleted is not located in your website files, they are located in the tables that are located in your SQL database.

The form data of Contact Form 7 are stored in the wp_posts table under wpcf7_contact_form post_type.

IMPORTANT: You  want to be sure that you are using the same version of Contact Form 7. If you deleted the form you want to restore and Contact Form 7 has been updated, you will want to revert to the older version before you update your SQL database.

The instructions for both are below using Site Back Up Pro (not ManageWP). If you understand the instructions below, you should be able to make it work using Filezilla.

Restoring Contact Form 7 to Previous Version

Chances are, you may not need to do this initial step, but if it has been several days or weeks since you deleted your form, you will want to go back to the version of Contact Form 7 that you were using when you deleted the from. If you know do not have to restore to a previous version, then go to Restore the Deleted Contact Form .

STEP 1: Login to your cPanel and choose Site Back Up Pro from your options.

STEP 2: Choose Website Files -> Browse. From there, (if you have more than 1 website, be sure to be in the right website folder) navigate (by clicking): wp-content -> plugins.

Browse Website Files

STEP 3: Check the box to the left of the folder named 'contact-form-7', and then click 'restore'.

Note: If you are unsure what database goes with your website, you can locate it from your file manager. Select the website folder, then select view on the wp-config.php file. Scroll till you see the line with the database name, in 'define('DB_NAME', 'xxxxxx_xxxx');

This may take a few minutes, but at the top of the page it will tell you the status. After the restore has been completed, continue to the next steps below.

Restore the Deleted Contact Form into Contact Form 7

STEP 1: From your cPanel, go to your Site Back-up Pro as explained in Step 1 above.

STEP 2: Click the browse link under MySQL'

STEP 3: Select your data base (left check in image below) and then click on 'restore tables'.

MySQL
select database

STEP 4:  Select the  'wp_cf7dbplugin_st' table and then click the "restore tables' button.

Allow the tables to restore completely and then go back to your websites Contact Form 7 forms and you should see the form you deleted.

And that is how I recovered a deleted contact form for Contact Form 7, this worked for me.

Contact Form 7 sql
SEO Alien
"Helping small businesses with smaller budgets compete with big brands with bigger budgets in the online market space since 2009."

About the Author:

The SEO-Alien is a project started in 2009 regarding all things online marketing. The site started out more of a diary of predictions, suggestions and references to things I frequently used for online marketing... before social media marketing was even an option.

I hope you find the information and tools presented here useful and something worth sharing with others.

If there is anything else about online marketing or any online advertising strategy you think would be helpful, please let me know.


Jasper AI
Ninja Forms
Jasper try for free
Try Jasper today for no charge and you will be credited 10,000 FREE credits when you register for the 5 day free trial.
Download Free Divi Templates On Black Friday

Some of the links on this page may be "affiliate links", a link with a special tracking code. This means we may get paid commission on sales of those products or services we write about. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we have used, tested and believe will add value to our readers and our editorial content is not influenced by advertisers or affiliate partnerships. Basically, we may earn some much needed 🐶 biscuit money, and we genuinely appreciate your support.

This disclosure is provided in accordance with the Federal Trade Commission’s 16 CFR § 255.5: Guides Concerning the Use of Endorsements and Testimonials in Advertising.