Skip to content

workflowdone/smartdump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 

Repository files navigation

SmartDump ⚑

License: MIT PHP Version Version

The modern BigDump alternative. Import large MySQL databases with a beautiful step-by-step wizard interface.

β€’ Report Bug β€’ Request Feature

SmartDump Interface

✨ Features

Why SmartDump over BigDump?

Feature BigDump SmartDump
Modern UI ❌ βœ… Bootstrap 5
Step-by-Step Wizard ❌ βœ… 4 simple steps
Upload Progress ❌ βœ… Real-time
Auto-Detection ❌ βœ… Charset & Prefix
Live Logs ⚠️ Basic βœ… Terminal-style
Error Handling ⚠️ Limited βœ… 3 modes
Email Notifications ❌ βœ…
Database Backup ❌ βœ…
WordPress Optimized ⚠️ βœ…
Mobile Responsive ❌ βœ…
Last Updated 2023 2024 (Active)

πŸš€ Core Features

  • Chunked Execution - Import databases up to 500MB+ without timeout errors
  • Smart Auto-Detection - Automatically detects charset, collation, and table prefixes
  • Real-Time Progress - Live progress bar, percentage, and terminal-style logs
  • WordPress Ready - Handles WordPress & WooCommerce serialized data perfectly
  • Table Prefix Replacement - Easily change table prefixes (e.g., wp_ β†’ newwp_)
  • Resume Support - Continue from where you left off if connection drops
  • 3 Error Modes - Continue on errors, ignore duplicates only, or stop on first error
  • FTP Upload Support - For files too large for browser upload
  • Database Backup - Backup your database before importing
  • Email Notifications - Get notified when import completes
  • Enterprise Security - Input validation, SQL injection prevention, path traversal protection

πŸ“¦ Installation

Requirements

  • PHP 7.4 or higher
  • MySQL 5.6+ or MariaDB 10.0+
  • MySQLi extension enabled
  • At least 128MB PHP memory limit

Quick Start

  1. Download SmartDump

    wget https://github.com/workflowdone/smartdump/releases/latest/download/smartdump.php
  2. Upload to your server

    • Via FTP/SFTP to your web directory
    • Or copy directly if you have shell access
  3. Access via browser

    https://yourdomain.com/smartdump.php
    
  4. Follow the wizard (4 simple steps)

  5. Delete the file when done ⚠️ IMPORTANT for security!

That's it! No configuration needed.

🎯 Usage

Step 1: Upload SQL File

Option A: Browser Upload

  • Drag & drop your .sql or .gz file
  • Real-time upload progress bar
  • Recommended for files under 100MB

Option B: FTP Upload

  • Upload large files via FTP to smartdump_uploads/ folder
  • Click "Refresh Files" in the FTP tab
  • Select your file

Step 2: Database Configuration

Enter your MySQL credentials:

  • Host (usually localhost)
  • Database name
  • Username
  • Password

Click "Test Connection" to verify before proceeding.

Step 3: Import Settings

Auto-Detection (Recommended)

  • Click magic wand πŸͺ„ buttons to auto-detect:
    • Charset from SQL file
    • Table prefix from existing database

Manual Configuration

  • Charset: utf8mb4, utf8, latin1, cp1251
  • Collation: utf8mb4_unicode_ci, etc.
  • Max queries per step: 300 (default)
  • Max time per step: 30 seconds (default)

Optional Settings

  • Old Prefix β†’ New Prefix: Change table prefixes
  • Email Notification: Get notified when done
  • Error Handling:
    • Continue on errors (recommended for WordPress)
    • Ignore duplicates only
    • Stop on first error (strict mode)
  • DROP DATABASE: ⚠️ Delete all existing data

Step 4: Import

  • Watch real-time progress
  • Monitor live logs
  • Get statistics (queries executed, failed, success rate)
  • Optionally backup database when complete

πŸ”§ Configuration

Optional: Enable IP Whitelist

Edit line 23 in smartdump.php:

define('ENABLE_IP_WHITELIST', true);
define('ALLOWED_IPS', ['123.45.67.89', '98.76.54.32']);

Optional: Adjust Upload Limits

Create/edit php.ini or .htaccess:

upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
memory_limit = 512M

For Nginx, edit your config:

client_max_body_size 500M;

πŸ“– Use Cases

WordPress Migration

Perfect for moving WordPress sites between hosts:

  1. Export database from old host (via phpMyAdmin or plugin)
  2. Upload SQL file to SmartDump
  3. Auto-detect charset and prefix
  4. Import with "Continue on errors" mode
  5. Update wp-config.php with new credentials

WooCommerce Store Transfer

Handles large WooCommerce databases with ease:

  • Automatically handles serialized product data
  • Skips duplicate entry errors (common with WooCommerce)
  • Live logs show exactly what's happening
  • 99%+ success rate even with complex stores

Database Backup & Restore

  1. Use "Backup Database" feature before risky operations
  2. Download the backup SQL file
  3. If something goes wrong, restore using SmartDump

Localhost to Production

Import development databases to production:

  • Change table prefix if needed (local_ β†’ prod_)
  • Set error handling to "stop on first error" for strict imports
  • Get email notification when complete

πŸ›‘οΈ Security

Built-in Security Features

  • βœ… Input validation on all user inputs
  • βœ… SQL injection prevention (prepared statements)
  • βœ… Path traversal protection (basename, realpath checks)
  • βœ… XSS prevention (htmlspecialchars on output)
  • βœ… File type validation (whitelist)
  • βœ… CSRF protection via session validation
  • βœ… Optional IP whitelist
  • βœ… .htaccess protection for upload directories

Security Best Practices

  1. Delete SmartDump after use - Most important!
  2. Use strong database passwords
  3. Enable IP whitelist in production
  4. Only use on trusted networks
  5. Review SQL files before importing
  6. Keep backups before importing
  7. Don't leave uploaded files on server

πŸ› Troubleshooting

Upload Failed: 413 Error

Problem: File too large for server

Solution:

  • Use FTP Upload tab instead
  • Or increase Nginx client_max_body_size
  • Or increase PHP upload_max_filesize

Connection Failed

Problem: Cannot connect to database

Solutions:

  • Verify credentials are correct
  • Check database exists
  • Ensure MySQL is running
  • Check if host allows external connections
  • Try localhost instead of 127.0.0.1 or vice versa

Import Errors: Serialized Data

Problem: WordPress queries failing

Solution:

  • Use "Continue on errors" mode (recommended)
  • Or "Ignore duplicates only" mode
  • This is normal for WordPress - failed queries are usually cache/transients

Timeout Errors

Problem: Script times out

Solutions:

  • Reduce "Max queries per step" (try 200 or 100)
  • Reduce "Max time per step" (try 20 seconds)
  • Check server timeout limits
  • For very large files, consider using command line import

Files Not Showing

Problem: Uploaded files don't appear

Solutions:

  • Check smartdump_uploads/ directory exists
  • Verify directory permissions (755 or 777)
  • Check PHP upload_tmp_dir is writable
  • Look at browser console (F12) for errors

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Setup

# Clone the repo
git clone https://github.com/workflowdone/smartdump.git

# No dependencies to install!
# Just edit smartdump.php and test

πŸ“ Changelog

Version 1.0.0 (2024-12-08)

Initial Release

  • Step-by-step wizard interface
  • Auto-detection for charset and table prefixes
  • Real-time upload progress
  • Live import logs
  • 3 error handling modes
  • WordPress/WooCommerce optimization
  • Database backup feature
  • Email notifications
  • FTP upload support
  • Mobile responsive design

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ’– Support

If SmartDump saved you time and money, consider supporting development:

Donate via PayPal πŸ’™

Your support helps keep SmartDump free and actively maintained!

πŸ™ Credits

Created with ❀️ by WorkflowDone.com

Inspired by BigDump (2003-2023) - Thanks for years of service!

Built with:

πŸ“ž Contact & Links


Made with ❀️ by WorkflowDone.com

⭐ Star us on GitHub β€” it helps!

About

SmartDump - a modern alternative to bigdump

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors