If I make changes to a plugin's PHP file, e.g. located in
wp-content/plugins/plugin-name/, how do I prevent my PHP edits from getting erased once an update for the plugin rolls out? Is there such a thing as creating a child folder for plugins?
You don't, for the same reason you don't modify WordPress Core, you extend it or use hooks and filters to modify its behaviour.
So when extending or changing plugins you have 2 options:
You've been creating forks of a plugin so far, but it's important to change the name when this happens so your new plugin isn't overwritten. You'll need to manually port over changes from the original code base
Hooks, Filters etc
Create a new plugin, and use hooks and filters to interact with the plugin. A good plugin will provide filters to modify values, and hooks to allow your own plugin to intercept and adjust things.
You can use this to register new css/js, or disable functionality by removing filters/hooks added by the plugin and replacing them with your own.
You'll need to read the code of the plugin and refer to its documentation for what's possible.
Remember, plugin code is just code. Each plugins code shares the same environment so the idea of a parent or child plugin makes no sense. Only the order plugins are loaded and wether they're activated or not has any bearing here
There is no such child folder, but depending on the type of change, you can write a new plugin to override the code.
If it's Revolution Slider, be sure you're reading all the documentation to be sure you actually need to be doing the edits in the first place. Most things you would "need" to change might actually be settings.
Various possibilities. If fixing a bug, I'll sometimes actually make a patch and send it to the Plugin author. More than once they've added the patch and said thanks.
Beyond that, if you really need to hack a plugin, you should also change the folder and header info so that the auto-update doesn't recognize it. Of course you'll not get new updates.
There are some plugins that get mirrored on GitHub or similar. If you get it from there you might be able to merge new updates while maintaining your own modifications. That's a fairly unusual situation though.