If you deleted or some how the header and footer of your wordpress site goes missing, using these steps may help. This presumes you are using Elementor.
- Clone the site to a staging location
- Restore the production database from a previous backup to the staging's database
- Reset the site's URL via the Wordpress toolkit, if available, or other methods to the staging url
- Login to the staging version of the site
- Go to Elementor -> Tools -> Export / import kits
- Hit Start Export
- Uncheck all checkboxs on the next page except for "Templates"
- make sure "Templates" checkbox is checked
- Hit Export and save the resulting file to your downloads folder on your computer
- Take another backup of your production site
- Login to your production site
- Go to Elementor -> Tools -> Export / Import Kit
- Hit Start Import
- Select the kit file you downloaded
- Check only "Header" and "Footer" checkboxs -- no other checkboxes should be checked
- Hit start import
- Your header and footer should now be restored fully.