Or move a website, for that matter.
Based on help given by a hosting support rep:
- Save/Backup wp_content folder in the server files (cPanel > File Manager > public_html or in FileZilla).
- Export a backup of the database via phpMyAdmin.
To restore the site / move to new server:
- Do a backup of the corrupted wp_content and database, just in case.
- Delete WP install through cPanel > WordPress (that’s better than just deleting files from File Manager)
- Do a fresh install of WordPress through cPanel.
- Overwrite wp_content folder.
- Import database in phpMyAdmin.
- First, Check All tables, and Drop (delete)
- Then Import backed up db file.
- You may need to change the site urls in wp_options if the url has changed.