Photo credit: freeimages.com/photo/usb-connection-1242900

WordPress is a great platform because it has a huge community of developers, designers and wide variety of themes & plugins.

Most of the time existing solutions are pretty close but not quite. So site owners resort to customizations in order to save time and money. Many developers, when approached, would suggest building the solution from scratch because they like building things and always want to try a new framework and also so they can justify their quote.

Before making a decision several options need to be considered to see what’s in the best interest of the business. Sometime it would be quick and dirty fix and in others cases creating something almost from scratch. It really depends on the context, current/future plans of the business and how the WordPress plugin will be used.

Here are several approaches on how to customize a WordPress plugin

1. Hack an existing plugin’s code

2. Create an addon for the plugin

3. Hybrid approach: Partially hack the plugin & create an addon

4. Frankenstein’s monster approach: Create a custom plugin from scratch but use some ideas from existing WordPress plugin(s).

As always each approach has its own advantages and disadvantages.

1. Hack an existing WordPress plugin’s code directly

This is the usually faster (may not be fastest) way to get the job done unless the code is poorly written, full of (security) bugs and/or undocumented.

The problem with this approach is that the changes will get overridden when a new version of the plugin comes out. In such cases you or the developer will have to create a text file describing the changes and to reapply them after the each update.

As business owners are pretty busy running the business they will most likely forget about the customization and will update a customized plugin and as a result all the changes will be lost.

If the business needs something to get it implemented relatively quickly and this approach might work.

I used “relatively” because the developer needs to learn how the code works in order to add the new code without breaking what works. For example: if you do some changes to your house you don’t want to negatively affect the load-bearing wall or beam.

2. Create an addon for the plugin

Well written WordPress plugins use WordPress hook system. That allows other developers to extend the plugin. Good examples are WooCommerce, S2Member, bbPress, BuddyPress, Restrict Content Pro etc.

With this approach a new plugin is created. The main plugin can be safely updated and that won’t affect the new functionality unless the main plugin’s developer has decided to make changes to the hooks the plugin provided. This rarely happens but it does happen from time to time. The plugin should have a migration steps/document.

This is a better solution in the long term.

3. Partially hack the plugin + addon approach

This is the case where the plugin you want to customize is well written but may not provide hooks that you need.

In this case you hack the plugin’s code BUT only to add the additional hooks that will help you build an addon. Ideally, you should check the naming convention of the hooks so you can create one that follows the standards and then contact the developer and ask him/her to add the hook in a future release.



It’s always a idea to explain why you’re suggesting the new hook(s) and also to provide an example how you use it. That way the plugin developer can get a better idea the reasoning behind it. Adding the additional hook won’t slow the main plugin down at all. If you have a screen recording software that would help even more to get your idea across.

4. Frankenstein’s monster approach: Create a custom plugin from scratch but use code and ideas from existing plugins.

This is usually the most time consuming approach, however, depending on the situation this might be the best way to go. For example if you or your client needs some custom functionality that is available in multiple WordPress plugins but to work a little bit differently. Then you need to spend some time and learn how the existing plugins work and try to reverse engineer their work to see how they have attacked different problems and what solutions they’ve came up with.

The beauty of WordPress plugins and themes and open source is that you can see the actual code and learn from it.