# Your first plugin

As mentioned on the [modular design page](/primary-goals/modular-design.md), using our framework usually makes sense when you use at least the first 3 modules (Bootstrapper, Helpers, and Foundations). Those are as general as we can humanly think of and they try to set literally no expectations on your project while simultaneously offering you all the abstractions you need (in the form of Interfaces, Traits, and Abstract Classes) to build your plugin the way you see fit.

&#x20;If you only use only these 3 modules, there is a good chance there will be some unused files, but that shouldn't have any performance impact if you use the [Composer autoloader](/key-concepts-and-dev-tools/dependency-management-composer.md) (which for the rest of this documentation, we will definitely assume that you are).

{% hint style="info" %}
If you haven't already, check out our dedicated section for [setting up a development environment](/setting-up-your-dev-environment.md) on your machine.
{% endhint %}

There is an [example plugin](https://github.com/deep-web-solutions/wordpress-plugins-utility) on GitHub that only uses the first 5 modules. It's meant as a sort-of starter project for adding custom code to client websites (basically a replacement for the classical `functions.php`), but it can be easily used as a starter plugin as well.

We recommend that you download this plugin and use it as your starting base. This is a checklist of things you probably want to do after downloading the example plugin:

1. Rename the folder from `wordpress-plugins-utility` to the slug of your plugin.
2. Do a search for `DWS WordPress Utility Plugin` and replace it with your plugin's name.
3. Similarly, make sure to update the plugin header in `bootstrap.php` and `README.md` and optionally change the minimum PHP and WP versions.
4. Change the Deep Web Solutions references in `composer.json` and `package.json`.
5. Update the `composer.json` file to reflect the modules you really want to use. By default, the example plugin also installs `php-di/php-di` for [dependency injection](/key-concepts-and-dev-tools/dependency-injection-php-di.md) and `monolog/monolog` for logging but you are free to use your preferred packages.
6. Do a search for `DWS_Deps` and replace it with a unique name for your plugin. For example, we're using `DWS_LPM_Deps` for our [Locked Payment Methods plugin](https://www.deep-web-solutions.com/plugins/locked-payment-methods-for-woocommerce/).
7. Run `composer update --ignore-platform-reqs` and `npm update` in the plugin directory.

Congratulations! You are now ready to use start building a WordPress plugin using the DWS Framework. Continue reading the documentation of each module in order to understand how to use the framework effectively.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://framework.deep-web-solutions.com/your-first-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
