To merge customized codes upon wordpress update

When using update feature (in wp-admin/update-core.php page), it seems to me that wp just replaces all the resources, and the changes that have been made in the working resources just get erased instead of getting merged.

At least I've been experiencing with wp-login.php that gets replaced per every update and thus I have to reflect back the change from scratch (it's not easy often because the code in the file changes upon update).

Am I right? If so, are there ways to merge the changes already made with the update?

Topic merging automatic-updates updates customization Wordpress

Category Web


Yes, WordPress replaces all the resources.

No, there is no way to get the updater to merge changes. Even in theory, I doubt you could do that. Even the big version control systems-- SVN, GIT-- ultimately depend on user judgment. That suggests the only reasonable answer I can think of.

You should not be hacking core files at all, but if you must you will need to use a version control system on your end to try to manage your changes and merge them with each release. Of course, the automated updater will not be involved. You will need to update manually over FTP or run GIT (or other) on the production server.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.