Archiver
A powerful, single-file PHP script designed for creating reliable backups and seamless migrations.
Archive Creator
A powerful, single-file PHP script designed for creating reliable backups and seamless migrations on any web server. It's engineered to overcome common hosting limitations and provide a stable, user-friendly experience.
🎞️ A quick demo

📚 Table of Contents
- Designed for Universal Compatibility
- The PHP Engine: The Recommended Choice
- How It Works: A Smart Fallback System
- Quick Start Guide
- FAQ & Troubleshooting
- Security First
🌍 Designed for Universal Compatibility
A core design principle of this script is that it must work everywhere. Many backup tools fail on shared hosting due to strict server limits. This script is engineered to bypass these issues through:
- Single-File Architecture: The entire application is one file. No installation is needed. Just upload and run.
- Zero External Dependencies: The script does not rely on external libraries or frameworks, minimizing the risk of conflicts.
- Dual-Engine Architecture:
- System Engine: Uses the server's native commands (
zip,tar) for maximum speed and efficiency. - PHP Engine: If the System Engine is unavailable (e.g., the
exec()function is disabled), the script defaults to its built-in PHP methods. These are more universal, albeit slightly slower.
- System Engine: Uses the server's native commands (
- Asynchronous Processing: To prevent PHP timeouts, the PHP Engine processes files in small, JavaScript-driven batches. This allows the script to run for hours on servers with an execution time limit of just 30 seconds.
⭐ The PHP Engine: The Recommended Choice
For maximum compatibility and reliability across the widest range of hosting environments, the PHP Engine is the strongly recommended choice.
While the script offers a faster "System Engine," the PHP Engine is designed from the ground up to be resilient and feature-rich.
| Why You Should Use the PHP Engine |
|---|
| Universal Compatibility |
| Timeout-Proof Architecture |
| Full Feature Set |
When should I use the System Engine? The System Engine is a high-performance option for advanced users on servers where
exec()is enabled. It's faster but offers less compatibility and does not perform the migration-specific cleaning tasks. When in doubt, use the PHP Engine.
⚙️ How It Works: A Smart Fallback System
The script is built to be "self-healing." It always attempts to use the most efficient method available and seamlessly falls back to a more compatible alternative if the primary method fails. This layered approach ensures the process always completes.
| Operation | Primary Method (Performance) | Fallback Method (Reliability) |
|---|---|---|
| Archiving | System Engine (via exec() with zip or tar). Blazing fast and memory-efficient. |
PHP Engine (built-in ZipArchive / PharData). Works in batches to ensure completion. |
| Database Backup | mysqldump command-line. The industry standard for fast, complete database exports. |
Pure PHP Method. Streams the database row-by-row to avoid memory limits and timeouts. |
| Session Handling | Standard PHP file-based sessions. The default, efficient method for tracking state. | Database-based sessions. If file sessions fail, it uses the WordPress database to store its state. |
| File Scanning | RecursiveDirectoryIterator. A modern and fast PHP iterator for traversing directories. |
scandir(). A more basic, but universally supported function for reading directory contents. |
🚀 Quick Start Guide
- 1️⃣ Upload: Place the single
creator.phpfile in your website's root directory. - 2️⃣ Navigate: Open the script in your browser (e.g.,
https://yourdomain.com/creator.php). - 3️⃣ Select & Configure:
- Select the files and folders you want to archive.
- Choose the PHP Engine (recommended).
- For WordPress sites, check "Backup Database" in Step 3.
- 4️⃣ Start: Click "Start Archiving" and monitor the real-time progress.
- 5️⃣ Download & Clean Up: Once finished, download your archive(s) from the results screen.
⚠️ CRITICAL FINAL STEP After you have safely downloaded your files, click the "Delete Archives and Script" button. This securely removes all generated files and the script itself from your server. Never leave this script on a live website.
❓ FAQ & Troubleshooting
Q: The process times out or I get a "500 Server Error." What should I do?
A: This is the exact problem the PHP Engine is designed to solve.
Solution: Ensure you are using the PHP Engine and try lowering the "Files per batch" value in Step 2 (e.g., to 250 or 100).
Q: The "System Engine" option is disabled.
A: The exec() function is disabled in your server's PHP configuration.
Solution: This is expected on many shared hosts. Use the PHP Engine, which is the recommended method anyway.
Q: I can't create a .tar.gz archive.
A: The PHP Phar extension is not enabled or is set to read-only on your server.
Solution: Use the .zip format instead. This format is universally compatible and supports file splitting.
Q: The remote connection test (FTP/SFTP) fails. A: This is usually caused by a firewall on the source server (where the script is running) blocking outgoing connections. Solution: Double-check your credentials. If they are correct, contact your hosting provider to ensure outgoing connections on the specified port are allowed.
🔒 Security First
This script is a powerful server tool and must be handled with care.
- DELETE AFTER USE: The most important rule. Use the cleanup button after downloading your files.
- PROTECTED DIRECTORY: Archives are stored in a
dedicated backupsfolder, which is automatically protected from direct web access via a.htaccessfile. - SECURE DOWNLOADS: The download handler is built to prevent directory traversal attacks, ensuring only files from within the protected backup folder can be accessed.