Title: Cloning a WordPress Plugin
Last modified: August 18, 2016

---

# Cloning a WordPress Plugin

 *  [blabbr](https://wordpress.org/support/users/blabbr/)
 * (@blabbr)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/)
 * Hey everyone,
 * I wonder if there’s a more or less simple way to clone a WordPress plugin?
 * Is there somewhere a tutorial, a hack or something similar?
 * Or would that be too complicated?
 * I’d need it for the WPG2-Plugin (Gallery v2.0 implementation for WordPress by
   Ozgreg, [http://www.ozgreg.com](http://www.ozgreg.com)). I’m running two galleries
   on my site and would like to implement both of them. What exactly would need 
   to be changed?
 * Thanks for any suggestions and for support!
 * Regards, blabbr

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [logista](https://wordpress.org/support/users/logista/)
 * (@logista)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/#post-267062)
 * It’s simple, really. Make a copy of the plugin, and edit its header information
   to a new name.
 *  `Plugin Name: Hello Dolly` to `Plugin Name: My Hello Dolly`
 * You may have to change some plugin specific parameters (like if it uses a specific
   folder, you might need to change all of the references in the plugin to folder2
   or some such).
 * Upload it, and activate it.
 *  Thread Starter [blabbr](https://wordpress.org/support/users/blabbr/)
 * (@blabbr)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/#post-267124)
 * Hmm, I’m afraid, it’s not that easy … (or it is and I just can’t do it)
 * anyways: I made a copy of the WPG2-plugin folder. Then I tried activating the
   plugin in the admin panel, but then of course the expected php error came about:
   it couldn’t redeclare a function previously defined by the original plugin.
 * So – would I need to rename all the functions?
    And – what do you exactly mean
   by “edit its header information”? Where can this “header information” be found?
 * Thanks anyway for your help.
 *  [Cypher](https://wordpress.org/support/users/cypher/)
 * (@cypher)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/#post-267125)
 * You will have to go through and change all the function declarations on the two
   instances to be entirely different.
 * You might also have to rename global functions and so on. This, as you’ve already
   found out, can be quite extensive and error prone if the plugin is fairly complicated.
 * Regards
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/#post-267155)
 * And if it saves any preferences or anything else to the database, you’ll either
   have to change the name of the option valies or if it uses it’s own database 
   table, use a different name for that.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Cloning a WordPress Plugin’ is closed to new replies.

## Tags

 * [clone](https://wordpress.org/support/topic-tag/clone/)
 * [cloning](https://wordpress.org/support/topic-tag/cloning/)

 * 4 replies
 * 4 participants
 * Last reply from: [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * Last activity: [20 years, 8 months ago](https://wordpress.org/support/topic/cloning-a-wordpress-plugin/#post-267155)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
