If you are an experienced user you might laugh at this, but this seriously happens to people and its not a laughing matter to them.
Why this happend: The most likely cause is that you made manual changes to your template files such as the style.css file (usually). Then when you updated everything got overwritten with the default theme code.
How to prevent this from happening: When you want to make edits to your themes you should be doing it in several ways:
- Custom CSS Plugin – If you only need a few small tweaks you could use a custom CSS plugin to make your tweaks and ensure they aren’t deleted during a theme update.
- Create A Child Theme – Creating a child theme is probably the best method of customizing your theme and will allow the greatest flexibility and even allow you to edit template files (besides just style.css), remove or add new scripts as well as add custom functions.
- Keep A Changelog – Whether you are editing the template files manually (best no to) or using a child theme, creating a changelog is a good way for you to keep track of all the tweaks you’ve made to the theme. It’s especially useful if something breaks so you can back-track and see where you might have made a mistake.