=== DailyBkup ===
Contributors: imrandailybkup
Tags: backup, dropbox, wordpress backup, database backup, scheduled backup
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Stable tag: 0.1.31
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatic WordPress backups to Dropbox. Schedule daily backups of your files and database — and restore with one click.

== Description ==

**DailyBkup** is a lightweight WordPress backup plugin that automatically backs up your entire site — files and database — and uploads the archive to Dropbox.

No complicated setup. No third-party backup services. Just configure once and your site is protected every day.

= Why DailyBkup? =

Most backup plugins are bloated, slow, or charge a monthly fee just to store your backups. DailyBkup is different:

* **Your storage, your files** — backups go straight to your own Dropbox account
* **Files + database** — both packaged into a single ZIP archive per run
* **Schedule it once** — configure a daily server cron and forget about it
* **Restore anytime** — download or restore directly from the plugin dashboard
* **Activity logs** — every backup run is logged so you know exactly what happened

= Features =

* ✅ Scheduled daily WordPress backups via server cron
* ✅ Full site backup — WordPress files, themes, plugins, and uploads
* ✅ Database backup — complete SQL snapshot included
* ✅ Dropbox cloud storage — uploads directly to your Dropbox folder
* ✅ One-click on-demand backup — run a backup any time from the dashboard
* ✅ Restore from backup — restore files and database from any stored backup
* ✅ Retention & cleanup — automatically keep only the last N backups
* ✅ Activity log — full history of backup and restore jobs
* ✅ Backup scope control — backup files only, database only, or both
* ✅ Runtime strategy — tune compression for shared hosting or VPS

= How It Works =

1. Connect your Dropbox account using your own App Key and App Secret
2. Set a backup folder path in Dropbox (e.g. `/dailybkup`)
3. Configure the provided cron command in your hosting control panel (cPanel, Plesk, etc.)
4. DailyBkup runs automatically every day, uploads the backup archive to Dropbox, and logs the result

= On-Demand Backup & Restore =

You don't have to wait for the scheduled run. Go to **DailyBkup → On-Demand** to:

* Run a full backup right now
* Browse backup files stored in Dropbox
* Restore your site files, database, or both from any backup

= Who Is This For? =

* WordPress site owners who want **simple, reliable daily backups**
* Developers managing client sites who need **hands-off automated backups**
* Anyone who has lost a site before and never wants it to happen again

= Pro Version =

The free version includes Dropbox storage and daily backups. The **DailyBkup Pro** version adds:

* AWS S3, Cloudflare R2, Google Drive, Azure Blob, SFTP, DigitalOcean Spaces
* Multi-cloud backup — send each backup to multiple providers simultaneously
* Hourly and weekly backup schedules
* Site migration tools
* Priority support

Learn more at [dailybkup.com](https://dailybkup.com)

== External Services ==

This plugin connects to Dropbox when you authorize Dropbox backup storage, upload backup archives, list stored backup files, create temporary download links, or disconnect Dropbox.

Dropbox service provider: Dropbox, Inc.
Service URL: https://www.dropbox.com/
API URL: https://api.dropboxapi.com/
Privacy Policy: https://www.dropbox.com/privacy
Terms: https://www.dropbox.com/terms

This plugin connects to YouTube to display DailyBkup video tutorials in the plugin dashboard. The plugin requests the public DailyBkup YouTube channel page and public video feed when the dashboard tutorial card is loaded or refreshed. No WordPress user data, backup archives, database contents, Dropbox credentials, or license keys are sent to YouTube.

YouTube service provider: Google LLC.
Service URL: https://www.youtube.com/
Feed URL: https://www.youtube.com/feeds/videos.xml
Privacy Policy: https://policies.google.com/privacy
Terms: https://www.youtube.com/t/terms

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via **Plugins → Add New** in WordPress admin.
2. Activate **DailyBkup** from the Plugins screen.
3. Go to **DailyBkup → Cloud Providers** and connect your Dropbox account.
4. Go to **DailyBkup → Settings** and copy the generated cron command into your hosting control panel.
5. That's it — your site will be backed up automatically every day.

== Frequently Asked Questions ==

= Where are my backups stored? =

Backups are uploaded directly to the Dropbox folder you configure on the Cloud Providers screen. They are stored in your own Dropbox account — not on any DailyBkup servers.

= Do I need a paid Dropbox account? =

No. A free Dropbox account works. Free Dropbox accounts include 2 GB of storage. If your site is larger, you may need a paid plan.

= How do I set up the cron job? =

Go to **DailyBkup → Settings**. The plugin generates the exact cron command for your server. Copy it and paste it into your hosting panel's cron job manager (cPanel → Cron Jobs). The plugin also shows the exact Minute, Hour, Day, Month, and Weekday values for cPanel's scheduler.

= Does it back up both files and the database? =

Yes. DailyBkup packages your WordPress files into a frontend ZIP archive and exports your database into a backend ZIP archive. Both are uploaded to Dropbox in a single backup run.

= Can I exclude folders from the backup? =

Yes. Go to **DailyBkup → Settings** and add folder paths to the exclusion list. Common items like `wp-content/cache` are excluded automatically.

= Can I run a backup manually without waiting for the cron? =

Yes. Go to **DailyBkup → On-Demand** and click **Start Backup** to run a full backup immediately.

= Can I restore my site from a backup? =

Yes. Go to **DailyBkup → On-Demand**, select a cloud provider and backup file, choose the restore scope (files, database, or both), and click **Start Restore**.

= Is this plugin compatible with shared hosting? =

Yes. The Runtime Strategy setting in DailyBkup → Settings lets you tune backup compression and pacing for shared hosting, VPS, or dedicated server environments.

= What PHP version is required? =

PHP 8.0 or higher is required.

= Does the free version support providers other than Dropbox? =

The free version supports Dropbox only. DailyBkup Pro adds AWS S3, Cloudflare R2, Google Drive, Azure Blob Storage, SFTP, and DigitalOcean Spaces.

== Screenshots ==

1. Dashboard — backup status, last run, next scheduled run, and storage overview
2. Cloud Providers — connect and manage your Dropbox account
3. Settings — configure backup schedule, scope, retention, and runtime strategy
4. On-Demand — run a backup or restore instantly from the browser
5. Activity Log — full history of every backup and restore job

== Changelog ==

= 0.1.31 =
* Added 23-hour cooldown enforcement for cron-triggered backups to prevent abuse
* Fixed cron/run.php direct access guard to work with all PHP binaries including lsphp
* Fixed cron command generation to log output to uploads directory instead of /dev/null

= 0.1.30 =
* Fixed Dropbox folder auto-creation on first backup run — no longer requires manually creating the folder in Dropbox

= 0.1.28 =
* Fixed cron command generation in dashboard JS to use log file redirect matching PHP-rendered command
* Added logPath to localized cron settings object

= 0.1.27 =
* Fixed cron/run.php PHP_SAPI guard to use HTTP_HOST detection — resolves lsphp compatibility on LiteSpeed hosts

= 0.1.26 =
* Replaced index.php guard file creation in uploads directory with .htaccess and index.html protection
* Improved cron/run.php direct access guard for Plugin Check compatibility

= 0.1.24 =
* Escaped admin asset output for Plugin Check compliance

= 0.1.16 =
* Improved cPanel cron setup guidance and fixed Dropbox backup list refresh behavior

= 0.1.0 =
* Initial release
