# Do you need to put .gitignore in commercial WordPress plugins?

**URL:** https://discourse.roots.io/t/do-you-need-to-put-gitignore-in-commercial-wordpress-plugins/20214
**Category:** bedrock
**Tags:** composer
**Created:** 2021-02-26T04:50:19Z
**Posts:** 4

## Post 1 by @anon70068201 — 2021-02-26T04:50:19Z

I just read this documentation [Private or Commercial WordPress Plugins as Composer Dependencies | Roots](https://roots.io/guides/private-or-commercial-wordpress-plugins-as-composer-dependencies/)

But there’s no mention if I should put .gitignore inside the plugin other than composer.json

Any opinions?

---

## Post 2 by @strarsis — 2021-02-26T10:16:06Z

A WordPress plugin is typically/usually shipped as ZIP file with the bare minimum of files (PHP runtime, PHP files, assets, GPL license, README).  
IMHO all plugin files of a commercial plugin should be committed.

---

## Post 3 by @anon70068201 — 2021-02-26T11:50:38Z

Right, the reason I asked this because some premium plugin like WP Rocket and few other plugins have .gitignore file on their files.

---

## Post 4 by @strarsis — 2021-02-26T12:20:28Z

Well, I would preserve all files that belong to a plugin. There are no downsides, right?

---

## Post 5 by @system — 2021-04-09T04:50:20Z

This topic was automatically closed after 42 days. New replies are no longer allowed.

---

## Post 6 by @ben — 2022-02-26T03:08:36Z



---

## Post 7 by @ben — 2022-02-26T04:10:19Z


