There are times when all you want to do is make a quick modification without having to create a separate plugin and write all the code to tap into WPCD’s hook and filters. For example, you might just want to change the default upload file size from 25M to 50M. Literally two characters. But it’s two characters that will get stomped on with every WPCD update.
If you’re familiar with the GIT version control system, it is possible to do simple changes like this without completely losing them on every WPCloudDeploy update.
There are two caveats to this though:
(Also, this technique works for any plugin or theme where you want to make updates directly to the files.).
The way it works is like this:
This is your baseline. Zip up the CUSTOM branch and upload to your WP install just like you would any other plugin (or upload via sFTP.)
When you need to apply a new WPCD update, eg: V 4.16.0, you would do this as follows:
If all goes well, there should be no conflicts during the merge. If this is the case, you can zip up your CUSTOM branch and upload to your WordPress install – it will contain all the latest WPCD changes along with your changes.
If you do see conflicts, you’ll need to create a new branch from MAIN (called CUSTOM2 for example) and reapply your changes manually. Or, if you’re an experienced GIT user, you can resolve the conflicts and commit in the CUSTOM branch.
If you’re not a command line user, there are many visual GIT tools. The one we use is called SMARTGIT. But you can also do this using just the browser based tools in GITHUB (or BITBUCKET or GITLAB or any other online git service).
You can also use this technique for all WPCD add-ons. Need to change the default deployment parameters for EC2? Or maybe tweak how a WC site is deployed? These kinds of minor changes are perfect for this technique if you’re willing to live with the limitations and caveats we mentioned earlier.