Exporting a custom module from one instance to another
Here are the steps you need to do:


Before you try anything, make sure you have a backup of everything
Copy the module directory into the correct directory in the other Drupal site
Enable the custom module


from the /admin/modules page
from the command-line using the drush en MODULE command

If the module requires any configuration, then you will have to do the configuration on the second website as well


If you have used the features module, it can be helpful in transferring module configuration