How to sync with plugins update after I have done manual optimizations?

I have several WordPress running plugins on my site and as per suggestions of wordpress performance optimizations I am planning to do the optimizations on plugins myself.

However, that will mean that I will have to modify existing plugins codes. Now, as WordPress plugins release frequent updates, the updates will wipe out my manual changes. How can I keep sync between these? That means, how can I get updated plugin and keep my manual changes as well?

Related posts

Leave a Reply

3 comments

  1. Create a local repository in Git (or SVN) for the plugin, and each time an update happens:

    • merge the changes into your adjusted version,
    • test it in your local copy of the production site,
    • then push your updated code to your site.

    But much better would it be to send your improvements to the plugin author, so she can use that in the main code. Keeping improvements secret is not the spirit of Open Source.

  2. There isn’t really a practical way to go about this that will ensure you can update plugins that you have modified and still guarantee your changes will work, unless you inspect the newly released code prior to merging your changes.

    So that means every time a plugin update is available, you would need to check that the modifications you have made are still applicable to the newly updated code base because in some instances a plugin author may change their Class/Method/Function structure so as it represents nothing like the changes you have made.

    In cases where your modifications do not work in the context of the newly released version of said plugin then you will need to re-adjust accordingly.

    You need to keep a local repository/copy/version of your changes and check those against future updates.

    This all requires some effort on your part, attention to detail, that would otherwise be better focused toward trying to convince the plugin authors in question to make the same changes that you have made for improved performance.