# Plugin life circle

Inside WordPress a plugin always follows the following life circle:

{% @mermaid/diagram content="stateDiagram-v2
\[\*] --> Activated: Activate
Activated --> Deactivated: Deactivate
Deactivated --> Activated: Activate
Deactivated --> Uninstalled: Uninstall" %}

It is possible to take advantage of it, to execute some code at one of these steps.

## Activate

The activate logic is a logic that will be executed when the plugin is installed or re-activated.

Launchpad offers [an easy way to add logic](https://wp-launchpad.gitbook.io/launchpad/launchpad-1/tutorials/index/index-1/activate) to execute on this step.

## Deactivate

The deactivate logic activated when the plugin is disabled.

Launchpad offers [an easy way to add logic](https://wp-launchpad.gitbook.io/launchpad/launchpad-1/tutorials/index/index-1/deactivate) to execute on this step.

## Uninstall

The uninstall logic is activated when the plugin is deleted.

Launchpad offers [a module to add logic](https://wp-launchpad.gitbook.io/launchpad/launchpad-1/tutorials/index/index-1/uninstall) to execute on this step.
