PHPackages                             hpez/dotenvbackup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hpez/dotenvbackup

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hpez/dotenvbackup
=================

Backup generator for .env file

v0.2.1(6y ago)071MITPHP

Since Nov 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hpez/DotEnvBackup)[ Packagist](https://packagist.org/packages/hpez/dotenvbackup)[ RSS](/packages/hpez-dotenvbackup/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

DotEnvBackup
============

[](#dotenvbackup)

This package intends to keep backups of your .env file. It checks for changes in .env file periodically on the given interval and creates a backup in your root folder in case of change.

Installation
------------

[](#installation)

Install the package using composer
`composer install hpez/dotenvbackup`

And publish the config file using
`php artisan vendor:publish --tag=config`

Configuration
-------------

[](#configuration)

You can set the interval for checking the env file for changes in the config file. By default, it checks for changes every minute.
The format is same as the format for cron jobs e.g.

```
Every minute: * * * * *
Every five minutes: */5 * * * *
Every hour at minute 0: 0 * * * *

```

You can use websites like [this](https://crontab-generator.org/) or [this](https://crontab.guru/) to generate one.
You can also customize the backup directory in the config file which defaults to your projects root directory retrieved from laravel's `base_path()` function.

Usage
-----

[](#usage)

Once you install the package it will automatically check for changes in .env file and create backups in the root of your project. It will also gitignore the created backups.

Contribution
------------

[](#contribution)

You can contribute to this project in the form of an issue or a pull request.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

2362d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/839d5fc6bcf7fd36a116904985206a0591f73ec60ccbdc08a05dd44dcbf9f7d1?d=identicon)[hpez](/maintainers/hpez)

---

Top Contributors

[![hpez](https://avatars.githubusercontent.com/u/23010096?v=4)](https://github.com/hpez "hpez (11 commits)")

---

Tags

backupsenvenvironment-variableslaravelpackagelaravelpackagebackupenvdotenv

### Embed Badge

![Health badge](/badges/hpez-dotenvbackup/health.svg)

```
[![Health](https://phpackages.com/badges/hpez-dotenvbackup/health.svg)](https://phpackages.com/packages/hpez-dotenvbackup)
```

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
