0
votes

I have developed many scripts and have put inside the theme folder of wordpress. Today somehow the theme got updated automatically. Now all the scripts gone. Nothing was there. Whether wordpress will backup the old theme somewhere before it updating the theme automatically?

PS: I haven't installed any plugin to backup automatically!

Thanks for your replies

2

2 Answers

2
votes

Wordpress will update and overwrite all the default (included) themes when it upgrades, so your changes will be overwritten.

To prevent this in future you should use a child theme, or manually upgrade by downloading the zip file from wordpress.org, unzipping it, and deleting the files that you don't want to be overwritten, then copying that across your existing installation. Creating a backup before you do this is also a good idea.

1
votes

To prevent this I strongly recommend that next time you work around with a child theme instead of editing your main theme files. This will prevent your edited files to be overwritten when the theme updates itself. Also start using a plugin that backups your files.

Wordpress itself doesn't backup any files prior to updating Wordpress, themes or plugins. What got overwritten is now overwritten. You can contact your host support and ask them if they made any backups on your site (some hosts do that on a weekly basis so they can revert changes in case of an error - but this is on a host by host basis and not all do this).

Hope this will be a good lesson for you to think about this things beforehand and I hope you retrieve all your lost files.