How to rename WP plugin?

I have been modifying free opensourse WP plugin on my test site and I want to change it’s name to a new one.

I tried doing so by going to my plugins list on wp-admin/plugin panel and using ‘edit’ button that got me to the editor, I changed plugin name there, saved it – but after that plugin deactivated itself and I couldn’t activate it back till I put the old name back.

How to change name and still have it working?

Example:

/*
Plugin Name: Old name
Description: Old description
Version: Old version

Result I am looking to get:

/*
Plugin Name: New name
Description: New description
Version: 1.4.0

Solutions Collecting From Web of "How to rename WP plugin?"

You can change the name by going to the main php file for the plugin. The name and description should be at the top. If you are unsure of which file is the main php file for the plugin just install it and go to the plugin editor. WP will display that file.

Note. If this plugin is from the WP repository, then changing the name is not advised as it will likely break the update engine, and not allow any updates to the plugin in the future