Why did I lose custom changes to the WordPress Default Theme during the last automatic upgrade?

A core upgrade copies all the new files from the distribution over the old ones, so if you changed existing files in the WordPress default theme (e.g. wp-content/themes/twentysixteen/style.css), those changes got overwritten with the new version of that file.

Please note, a core upgrade goes through a list of “old files”, as defined in wp-admin/includes/update-core.php, and deletes those files. Any files not on the list, and not in the distribution, are preserved.

Remember, that before upgrades, whether automatic or manual, both the WordPress Files and database should be backed-up as explained in WordPress Backups.

A better way to modify the default theme is by using a child theme. It’s a little more work to set up, but worth the effort because your customizations will be safe when the main theme is updated.

No luck what you’re looking for?

Let us know details about your quesiton. We’ll get back to you!