=== BackUpWordPress === Contributors: humanmade, joehoyle, mattheu, tcrsavage, willmot, cuvelier Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade Requires at least: 3.3.3 Tested up to: 3.5 Stable tag: 2.2 Simple automated back ups of your WordPress powered website. == Description == BackUpWordPress will back up your entire site including your database and all your files on a schedule that suits you. = Features = * Manage multiple schedules. * Super simple to use, no setup required. * Uses `zip` and `mysqldump` for faster back ups if they are available. * Works in low memory, "shared host" environments. * Option to have each backup file emailed to you. * Works on Linux & Windows Server. * Exclude files and folders from your back ups. * Good support should you need help. * Translations for Spanish, German, Chinese, Romanian, Russian, Serbian, Lithuanian, Italian, Czech, Dutch, French, Basque. = Help develop this plugin = The BackUpWordPress plugin is hosted GitHub, if you want to help out with development or testing then head over to https://github.com/humanmade/backupwordpress/. = Translations = We'd also love help translating the plugin into more languages, if you can help then please contact support@hmn.md or visit http://translate.hmn.md/. == Installation == 1. Install BackUpWordPress either via the WordPress.org plugin directory, or by uploading the files to your server. 2. Activate the plugin. 3. Sit back and relax safe in the knowledge that your whole site will be backed up every day. The plugin will try to use the `mysqldump` and `zip` commands via shell if they are available, using these will greatly improve the time it takes to back up your site. == Frequently Asked Questions == **Where does BackUpWordPress store the backup files?** Backups are stored on your server in `/wp-content/backups`, you can change the directory. **Important:** By default BackUpWordPress backs up everything in your site root as well as your database, this includes any non WordPress folders that happen to be in your site root. This does means that your backup directory can get quite large. **How do I restore my site from a backup?** You need to download the latest backup file either by clicking download on the backups page or via `FTP`. `Unzip` the files and upload all the files to your server overwriting your site. You can then import the database using your hosts database management tool (likely `phpMyAdmin`). See this post for more details http://hmn.md/backupwordpress-how-to-restore-from-backup-files/. **Does BackUpWordPress back up the backups directory?** No. **I'm not receiving my backups by email** Most servers have a filesize limit on email attachments, it's generally about 10mb. If your backup file is over that limit it won't be sent attached to the email, instead you should receive an email with a link to download the backup, if you aren't even receiving that then you likely have a mail issue on your server that you'll need to contact your host about. **How many backups are stored by default?** BackUpWordPress stores the last 10 backups by default. **How long should a backup take?** Unless your site is very large (many gigabytes) it should only take a few minutes to perform a back up, if your back up has been running for longer than an hour it's safe to assume that something has gone wrong, try de-activating and re-activating the plugin, if it keeps happening, contact support. **What do I do if I get the wp-cron error message** The issue is that your `wp-cron.php` is not returning a `200` response when hit with a http request originating from your own server, it could be several things, most of the time it's an issue with the server / site and not with BackUpWordPress. Some things you can test are. * Are scheduled posts working? (They use wp-cron too). * Are you hosted on Heart Internet? (wp-cron is known not to work with them). * If you click manual backup does it work? * Try adding `define( 'ALTERNATE_WP_CRON', true ); to your `wp-config.php`, do automatic backups work? * Is your site private (I.E. is it behind some kind of authentication, maintenance plugin, .htaccess) if so wp-cron won't work until you remove it, if you are and you temporarily remove the authentication, do backups start working? If you have tried all these then feel free to contact support. **How to get BackUpWordPress working in Heart Internet** The script to be entered into the Heart Internet cPanel is: `/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php` (note the space between php5 and the location of the file). The file `wp-cron.php` `chmod` must be set to `711`. **Further Support & Feedback** General support questions should be posted in the WordPress support forums, tagged with backupwordpress. For development issues, feature requests or anybody wishing to help out with development checkout BackUpWordPress on GitHub. You can also tweet @humanmadeltd or email support@hmn.md for further help/support. == Screenshots == 1. Manage multiple schedules. 2. Choose your schedule, backup type, number of backups to keep and whether to recieve a notification email. 3. Easily manage exclude rules and see exactly which files are included and excluded from your backup. == Changelog == #### 2.2 * Don't repeatedly try to create the backups directory in the `uploads` if `uploads` isn't writable. * Show the correct path in the warning message when the backups path can't be created. * Include any user defined auth keys and salts when generating the HMBKP_SECRET_KEY. * Stop relying on the built in WordPress schedules as other plugins can mess with them. * Delete old backups everytime the backups page is viewed in an attempt to ensure old backups are always cleaned up. * Improve modals on small screens and mobile devices. * Use the retina spinner on retina screens. * Update buttons to the new 3.5 style. * Fix a possible fatal error caused when a symlink points to a location that is outside an `open_basedir` restriction. * Fix an issue that could cause backups using PclZip with a custom backups path to fail. * Security hardening by improving escaping, sanitizitation and validation. * Increase the timeout on the ajax cron check, should fix issues with cron errors showing on slow sites. * Only clear the cached backup filesize if the backup type changes. * Add unit tests for all the schedule recurrences. * Fix an issue which could cause weekly and monthly schedules to fail. * Add an `uninstall.php` file which removes all BackUpWordPress data and options. * Catch a possible fatal error in `RecursiveDirectoryIterator::hasChildren`. * Fix an issue that could cause mysqldump errors to be ignored thus causing the backup process to use an incomplete mysqldump file. #### 2.1.3 * Fix a regression in `2.1.2` that broke previewing and adding new exclude rules. #### 2.1.2 * Fix an issue that could stop the settings panel from closing on save on servers which return `'0'` for ajax requests. * Fix an issue that could cause the backup root to be set to `/` on sites with `site_url` and `home` set to different domains. * The mysqldump fallback function will now be used if `mysqldump` produces an empty file. * Fix a possible PHP `NOTICE` on Apache servers. #### 2.1.1 * Fix a possible fatal error when a backup schedule is instantiated outside of wp-admin. * Don't use functions from misc.php as loading it too early can cause fatal errors. * Don't hardcode an English string in the JS, use the translated string instead. * Properly skip dot files, should fix fatal errors on systems with `open_basedir` restrictions. * Don't call `apache_mod_loaded` as it caused wierd DNS issue on some sites, use `global $is_apache` instead. * Fix a possible double full stop at the end of the schedule sentence. * Minor code cleanup. #### 2.1 * Stop blocking people with `safe_mode = On` from using the plugin, instead just show a warning. * Fix possible fatal error when setting schedule to monthly. * Fix issues with download backup not working on some shared hosts. * Fix issuses with download backup not working on sites with strange characters in the site name. * Fix a bug could cause the update actions to fire on initial activation. * Improved reliability when changing backup paths, now with Unit Tests. * Generate the lists of excluded, included and unreadable files in a more memory efficient way, no more fatal errors on sites with lots of files. * Bring back .htaccess protection of the backups directory on `Apache` servers with `mod_rewrite` enabled. * Prepend a random string to the backups directory to make it harder to brute force guess. * Fall back to storing the backups directoy in `uploads` if `WP_CONTENT_DIR` isn't writable. * Attempt to catch `E_ERROR` level errors (Fatal errors) that happen during the backup process and offer to email them to support. * Provide more granular status messages during the backup process. * Show a spinner next to the schedule link when a backup is running on a schedule which you are not currently viewing. * Improve the feedback when removing an exclude rule. * Fix an issue that could cause an exclude rule to be marked as default when it in-fact isn't, thus not letting it be deleted. * Add a line encouraging people to rate the plugin if they like it. * Change the support line to point to the FAQ before recommending they contact support. * Fix the link to the "How to Restore" post in the FAQ. * Some string changes for translators, 18 changed strings. #### 2.0.6 * Fix possible warning on plugin activation if the sites cron option is empty. * Don't show the version warning in the help for Constants as that comes from the current version. #### 2.0.5 * Re-setup the cron schedules if they get deleted somehow. * Delete all BackUpWordPress cron entries when the plugin is deactivated. * Introduce the `HMBKP_SCHEDULE_TIME` constant to allow control over the time schedules run. * Make sure the schedule times and times of previous backups are shown in local time. * Fix a bug that could cause the legacy backup schedule to be created on every update, not just when going from 1.x to 2.x. * Improve the usefulness of the `wp-cron.php` response code check. * Use the built in `site_format` function for human readable filesizes instead of defining our own function. #### 2.0.4 * Revert the change to the way the plugin url and path were calculated as it caused regressions on some systems. #### 2.0.3 * Fix issues with scheduled backups not firing in some cases. * Better compatibility when the WP Remote plugin is active alongside BackUpWordPress. * Catch and display more WP Cron errors. * BackUpWordPress now fails to activate on WordPress 3.3.2 and below. * Other minor fixes and improvements. #### 2.0.2 * Only send backup failed emails if the backup actually failed. * Turn off the generic "memory limit probably hit" message as it was showing for too many people. * Fix a possible notice when the backup running filename is blank. * Include the `wp_error` response in the cron check. #### 2.0.1 * Fix fatal error on PHP 5.2. #### 2.0 * Ability to have multiple schedules with separate settings & excludes per schedule. * Ability to manage exclude rules and see exactly which files are included and excluded. * Fix an issue with sites with an `open_basedir` restriction. * Backups should now be much more reliable in low memory environments. * Lots of other minor improvements and bug fixes. #### 1.6.9 * Updated and improved translations across the board - props @elektronikLexikon. * German translation - props @elektronikLexikon. * New Basque translation - props Unai ZC. * New Dutch translation - Anno De Vries. * New Italian translation. * Better support for when WordPress is installed in a sub directory - props @mattheu #### 1.6.8 * French translation props Christophe - http://catarina.fr. * Updated Spanish Translation props DD666 - https://github.com/radinamatic. * Serbian translation props StefanRistic - https://github.com/StefanRistic. * Lithuanian translation props Vincent G - http://www.Host1Free.com. * Romanian translation. * Fix conflict with WP Remote. * Fix a minor issue where invalid email address's were still stored. * The root path that is backed up can now be controlled by defining `HMBKP_ROOT`. #### 1.6.7 * Fix issue with backups being listed in reverse chronological order. * Fix issue with newest backup being deleted when you hit your max backups limit. * It's now possible to have backups sent to multiple email address's by entering them as a comma separated list. * Fix a bug which broke the ability to override the `mysqldump` path with `HMBKP_MYSQLDUMP_PATH`. * Use `echo` rather than `pwd` when testing `shell_exec` as it's supported cross platform. * Updated Spanish translation. * Fix a minor spelling mistake. * Speed up the manage backups page by caching the FAQ data for 24 hours. #### 1.6.6 * Fix backup path issue with case sensitive filesystems. #### 1.6.5 * Fix an issue with emailing backups that could cause the backup file to not be attached. * Fix an issue that could cause the backup to be marked as running for ever if emailing the backup `FATAL` error'd. * Never show the running backup in the list of backups. * Show an error backup email failed to send. * Fix possible notice when deleting a backup file which doesn't exist. * Fix possible notice on older versions of `PHP` which don't define `E_DEPRECATED`. * Make `HMBKP_SECURE_KEY` override-able. * BackUpWordPress should now work when `ABSPATH` is `/`. #### 1.6.4 * Don't show warning message as they cause to much panic. * Move previous methods errors to warnings in fallback methods. * Wrap `.htaccess` rewrite rules in if `mod_rewrite` check. * Add link to new restore help article to FAQ. * Fix issue that could cause "not using latest stable version" message to show when you were in-fact using the latest version. * Bug fix in `zip command` check that could cause an incorrect `zip` path to be used. * Detect and pass `MySQL` port to `mysqldump`. #### 1.6.3 * Don't fail archive verification for errors in previous archive methods. * Improved detection of the `zip` and `mysqldump` commands. * Fix issues when `ABSPATH` is `/`. * Remove reliance on `SECURE_AUTH_KEY` as it's often not defined. * Use `warning()` not `error()` for issues reported by `zip`, `ZipArchive` & `PclZip`. * Fix download zip on Windows when `ABSPATH` contains a trailing forward slash. * Send backup email after backup completes so that fatal errors in email code don't stop the backup from completing. * Add missing / to `PCLZIP_TEMPORARY_DIR` define. * Catch and display errors during `mysqldump`. #### 1.6.2 * Track `PHP` errors as backup warnings not errors. * Only show warning message for `PHP` errors in BackUpWordPress files. * Ability to dismiss the error / warning messages. * Disable use of `PclZip` for full archive checking for now as it causes memory issues on some large sites. * Don't delete "number of backups" setting on update. * Better handling of multibyte characters in archive and database dump filenames. * Mark backup as running and increase callback timeout to `500` when firing backup via ajax. * Don't send backup email if backup failed. * Filter out duplicate exclude rules. #### 1.6.1 * Fix fatal error on PHP =< 5.3 #### 1.6 * Fixes issue with backups dir being included in backups on some Windows Servers. * Consistent handling of symlinks across all archive methods (they are followed). * Use .htaccess rewrite cond authentication to allow for secure http downloads of backup files. * Track errors and warnings that happen during backup and expose them through admin. * Fire manual backups using ajax instead of wp-cron, `HMBKP_DISABLE_MANUAL_BACKUP_CRON` is no longer needed and has been removed. * Ability to cancel a running backup. * Zip files are now integrity checked after every backup. * More robust handling of failed / corrupt zips, backup process now fallsback through the various zip methods until one works. * Use `mysql_query` instead of the depreciated `mysql_list_tables`. #### 1.5.2 * Better handling of unreadable files in ZipArchive and the backup size calculation. * Support for wp-cli, usage: `wp backup [--files_only] [--database_only] [--path