1 === Database Backup for WordPress === |
1 === Database Backup for WordPress === |
2 Contributors: deliciousbrains |
2 Contributors: deliciousbrains |
3 Tags: mysql, database, backup, cron |
3 Tags: mysql, database, backup, database backup |
4 Requires at least: 3.6.0 |
4 Requires at least: 3.6.0 |
5 Tested up to: 5.7 |
5 Tested up to: 6.0 |
6 Stable tag: 2.4 |
6 Stable tag: 2.5.2 |
7 Requires PHP: 5.3 |
7 Requires PHP: 5.3 |
8 |
8 |
9 On-demand backup of your WordPress database. |
9 Database Backup for WordPress is your one-stop database backup solution for WordPress. |
10 |
10 |
11 == Description == |
11 == Description == |
12 |
12 |
13 Database Backup for WordPress allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database. |
13 Backup your database instantly, send the backup via email, or schedule backups to run automatically. |
14 |
14 |
15 Released under the terms of the GNU GPL, version 2. |
15 Database Backup for WordPress allows you to quickly back up your core WordPress database tables, and either download the backup as a gzipped file, or send it via email to an address you choose. |
16 |
16 |
17 [Source Code on GitHub](https://github.com/deliciousbrains/wp-db-backup) |
17 By default, the plugin will always back up all the core WordPress database tables. However, you may also selectively back up any custom tables that might be created by other plugins |
|
18 |
|
19 Additional options include the ability to exclude spam comments from the comments table, or post revisions from the posts table, saving you space and bandwidth. |
|
20 |
|
21 You can also enable scheduled backups to run automatically at set intervals, and configure the email address to send the scheduled backups to. |
|
22 |
|
23 = Backup Before You Mess Up = |
|
24 |
|
25 Backups are the one thing you don’t think of until you need them. You might have the best web host, the most secure server, and a tried and tested process for running plugin, theme, or core updates. But all it takes is one little thing to go wrong, and you lose your entire website. |
|
26 |
|
27 You need a reliable and automated solution which backs up your WordPress data and sends it to an off-site location. Database Backup for WordPress is that solution. |
|
28 |
|
29 = Why You Should Back Up Your Website = |
|
30 |
|
31 As much planning as you do, any CMS like WordPress that stores its data in a database is vulnerable. Hardware, software, and security hiccups are rare, but they do happen. Even the best enterprise systems in the world have multiple levels of backup in place. |
|
32 |
|
33 Think about the data you store in your WordPress site. Your blog posts since the day you launched the site. Your customers, products, and order history if you run an ecommerce site. Backups are like implementing an insurance policy for your data. With backups, you have a reliable way of restoring that data if anything goes wrong. |
|
34 |
|
35 Simple, automated backups save you time and give you peace of mind that you are prepared for the worst case scenario, even if you never need it. Better to have it and not need it, than to not have it and suddenly need it. |
|
36 |
|
37 = Scheduled Backups = |
|
38 |
|
39 Depending on your needs, you might want to back up your database every few minutes, hourly, daily, weekly, or monthly. You’ll want to automate this process, or it becomes another possible point of failure. |
|
40 |
|
41 Scheduled backups give you peace of mind that your data is being backed up as much or as little as you need, without your intervention. By emailing the backups to an email address you choose, you can verify that the backup has run, and store it in a safe location. |
18 |
42 |
19 == Installation == |
43 == Installation == |
20 1. Extract the wp-db-backup/ folder file to /wp-content/plugins/ |
44 |
21 1. Activate the plugin at your blog's Admin -> Plugins screen |
45 From your WordPress dashboard |
22 1. The plugin will attempt to create a directory /wp-content/backup-*/ inside your WordPress directory. |
46 |
23 1. You may need to make /wp-content writable (at least temporarily) for it to create this directory. |
47 1. **Visit** Plugins > Add New |
24 For example: |
48 1. **Search** for "Database Backup for WordPress" |
25 `$ cd /wordpress/` |
49 1. **Install and Activate** Database Backup for WordPress from your Plugins page |
26 `$ chgrp www-data wp-content` (where "`www-data`" is the group your FTP client uses) |
50 1. **Click** on **Backup** in the "Tools" menu item, to select your backup settings, or schedule a backup to run automatically |
27 `$ chmod g+w wp-content` |
|
28 |
51 |
29 == Frequently Asked Questions == |
52 == Frequently Asked Questions == |
30 |
53 |
31 = How do I restore my database from a backup? = |
54 = How do I restore my database from a backup? = |
32 |
55 |
33 Briefly, use phpMyAdmin, which is included with most hosting control panels. More details and links to further explanations are [here](http://codex.wordpress.org/Restoring_Your_Database_From_Backup). |
56 The backup file is a gzipped MySQL database export, which can be used to restore with MySQL applications like phpMyAdmin, included with most hosting control panels. If you are comfortable with the command line, you can also restore the database using the `mysql` command. More info on how to restore databases is available [here](https://wordpress.org/support/article/restoring-your-database-from-backup/). |
34 |
57 |
35 = My backup stops or hangs without completing. = |
58 = Why does my backup stop or hang without completing? = |
36 |
59 |
37 If you edit the text of wp-db-backup.php in a text editor like Notepad, you’ll see around line 50 the following: |
60 If the backup stops prematurely, you can enable a plugin setting that will implement a small delay after each table is backed up. To do this, add the following line to your `wp-config.php` file, just above the `/* That's all, stop editing! Happy publishing. */` line: |
38 |
61 |
39 `/** |
62 ` |
40 * Set DBBWP_MOD_EVASIVE_OVERRIDE to true |
63 define( 'DBBWP_MOD_EVASIVE_OVERRIDE', true ); |
41 * and increase DBBWP_MOD_EVASIVE_DELAY |
64 ` |
42 * if the backup stops prematurely. |
|
43 */ |
|
44 // define('DBBWP_MOD_EVASIVE_OVERRIDE', false); |
|
45 define('DBBWP_MOD_EVASIVE_DELAY', '500');` |
|
46 |
65 |
47 Do what it says: un-comment DBBWP_MOD_EVASIVE_OVERRIDE and set it to true like so: |
66 If you are still experiencing problems, you can also increase the delay, by defining the `DBBWP_MOD_EVASIVE_DELAY` constant in your `wp-config.php` file and giving it a value higher than 500 (which is the default). |
48 |
67 |
49 `define('DBBWP_MOD_EVASIVE_OVERRIDE', true);` |
68 ` |
|
69 define( 'DBBWP_MOD_EVASIVE_DELAY', '600' ); |
|
70 ` |
50 |
71 |
51 That will slow down the plugin, and you can slow it even further by increasing the DBBWP_MOD_EVASIVE_DELAY number from 500. |
72 We recommend incrementing the value by 100 each time, until the process completes successfully. |
52 |
73 |
53 Better yet, put the lines that define the `DBBWP_MOD_EVASIVE_OVERRIDE` and `DBBWP_MOD_EVASIVE_DELAY` constants in your wp-config.php file, so your settings don't get erased when you upgrade the plugin. |
74 = What is `wp-db-backup.pot` for? = |
54 |
75 |
55 = What is wp-db-backup.pot for? = |
76 This file is used by non-English users to translate the user interface text into their native language. Translators are encouraged to submit translated files, which will be made available to others [here](http://plugins.trac.wordpress.org/browser/wp-db-backup/i18n/). |
56 |
|
57 This files is used by non-English users to translate the display into their native language. Translators are encouraged to submit translated files, which will be made available to others here: |
|
58 http://plugins.trac.wordpress.org/browser/wp-db-backup/i18n/ |
|
59 |
77 |
60 = Why are only the core database files backed up by default? = |
78 = Why are only the core database files backed up by default? = |
61 |
79 |
62 Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups. |
80 Generally the most important site data is stored in the core WordPress tables. It's not uncommon for some plugins to have a bunch of visitor statistics stored in their custom tables that aren’t usually considered essential data that needs to be restored after a catastrophic failure. However, it’s possible that some important data is stored in these additional tables, and you may want to back them up. We recommend reviewing the current tables in your database, and deciding which ones you would need in the case of a catastrophic failure. |
63 |
81 |
64 == Usage == |
82 = Why aren’t my backups being generated correctly? = |
65 1. Click the Tools or Manage menu in your WordPress admin area. |
|
66 1. Click the Backup sub-menu. |
|
67 |
83 |
68 1. The plugin will look for other tables in the same database. You may elect to include other tables in the backup. |
84 The plugin will attempt to create a directory `/wp-content/backup-*/` inside your WordPress directory. You may need to make `/wp-content writable` (at least temporarily) for it to create this directory. For example: |
69 ** NOTE ** |
|
70 Including other tables in your backup may substantially increase the size of the backup file! |
|
71 This may prevent you from emailing the backup file because it's too big. |
|
72 |
85 |
73 1. Select how you'd like the backup to be delivered: |
86 1. `$ cd /wordpress/` |
74 * Download to your computer : this will send the backup file to your browser to be downloaded |
87 1. `$ chgrp www-data wp-content` (where "`www-data`" is the group your FTP client uses) |
75 * Email : this will email the backup file to the address you specify |
88 1. `$ chmod g+w wp-content` |
76 |
89 |
77 1. Click "Backup!" and your database backup will be delivered to you. |
|
78 |
90 |
79 The filename of the backup file will be of the form |
91 == Screenshots == |
80 DB_prefix_date.sql |
|
81 DB = the name of your WordPress database, as defined in wp-config.php |
|
82 prefix = the table prefix for this WordPress blog, as defined in wp-config.php |
|
83 date = CCYYmmdd_B format: 20050711_039 |
|
84 the "B" is the internet "Swatch" time. |
|
85 See the PHP date() function for details. |
|
86 |
92 |
87 When having the database backup emailed or sent to your browser for immediate download, the backup file will be _deleted_ from the server when the transfer is finished. |
93 1. Backup tables |
|
94 1. Backup options |
|
95 1. Scheduled backup |
88 |
96 |
89 == Changelog == |
97 == Changelog == |
|
98 |
|
99 = 2.5.2 - 2022-05-09 = |
|
100 * Security: "Scheduled Backup" form now has nonce check |
|
101 |
|
102 = 2.5.1 - 2022-01-17 = |
|
103 * Security: Make sure table exists before attempting backup |
|
104 |
|
105 = 2.5 - 2021-12-17 = |
|
106 * New: Brand new user interface |
|
107 * Improvement: Compatibility with WordPress 5.8 |
90 |
108 |
91 = 2.4 = |
109 = 2.4 = |
92 * Compatibility with PHP 8 and WordPress 5.7 |
110 * Compatibility with PHP 8 and WordPress 5.7 |
93 * Fix email backup functionality |
111 * Fix email backup functionality |
94 * Fix for bug where backup file would be gzipped twice |
112 * Fix for bug where backup file would be gzipped twice |