Giter Club home page Giter Club logo

lesterchan / wp-dbmanager Goto Github PK

View Code? Open in Web Editor NEW
69.0 5.0 26.0 639 KB

Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.

Home Page: https://wordpress.org/plugins/wp-dbmanager/

PHP 100.00%
backup-database wp-dbmanager restore-database mysqldump mysql wordpress wordpress-plugin lesterchan

wp-dbmanager's Introduction

WP-DBManager

Contributors: GamerZ
Donate link: http://lesterchan.net/site/donation/
Tags: database, manage, wp-dbmanager, manager, table, optimize, backup, queries, query, drop, empty, tables, table, run, repair, cron, schedule, scheduling, automatic
Requires at least: 4.0
Tested up to: 6.3
Stable tag: 2.80.9

Manages your WordPress database.

Description

Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.

General Usage

  1. Activate WP-DBManager Plugin
  2. The script will automatically create a folder called backup-db in the wp-content folder if that folder is writable. If it is not created, please create the folder and ensure that the folder is writable
  3. Open Folder: wp-content/backup-db
  4. If you are on Apache, move the htaccess.txt file from Folder: wp-content/plugins/wp-dbmanager to Folder: wp-content/backup-db/.htaccess if it is not there already
  5. If you are on IIS, move the Web.config.txt file from Folder: wp-content/plugins/wp-dbmanager to Folder: wp-content/backup-db/Web.config if it is not there already
  6. Move index.php file from Folder: wp-content/plugins/wp-dbmanager to Folder: wp-content/backup-db/index.php if it is not there already
  7. Go to WP-Admin -> Database -> DB Options to configure the database options

Build Status

Build Status

Development

Translations

Credits

Donations

  • I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.

Disclaimer

  • Note that this plugin passes your datababase password via --password in the command line of mysqldump. This is convenient but as a trade off, it is insecure.
  • On some systems, your password becomes visible to system status programs such as ps that may be invoked by other users to display command lines. MySQL clients typically overwrite the command-line password argument with zeros during their initialization sequence. However, there is still a brief interval during which the value is visible. Also, on some systems this overwriting strategy is ineffective and the password remains visible to ps. Source: End-User Guidelines for Password Security
  • If this is a concern to you, I recommend another database backup plugin called WP-DB-Backup
  • To know about the difference between WP-DBManager and WP-DB-backup, checkout What is the difference between WP-DBManager and WP-DB-Backup? in the FAQ section.

Changelog

Version 2.80.9

  • FIXED: Handle folder permissions properly

Version 2.80.8

  • FIXED: Miss out database-backup.php.

Version 2.80.7

  • FIXED: Changed 'edit_files' capability to 'install_plugins' instead.

Version 2.80.6

  • FIXED: Remove 'manage_database' and use 'edit_files' to check for capability instead.

Version 2.80.5

  • FIXED: Changed utf8 to utf8mb4 for backing up

Version 2.80.4

  • FIXED: Clear WP-DBManager cron jobs on uninstall

Version 2.80.3

  • FIXED: Poly fill array_key_first() for PHP < 7.3

Version 2.80.2

  • FIXED: Newer backup is being replaced instead of older backup

Version 2.80.1

  • FIXED: 1970 date issues.
  • FIXED: Sorting order of backup files.

Version 2.80

  • NEW: Prefix MD5 checksum to the database backup file to prevent user from guessing the filename.

Version 2.79.2

Version 2.79.1

  • FIXED: Added default utf8 charset

Version 2.79

  • FIXED: Proper check for disabled functions

Version 2.78.1

  • NEW: Bump WordPress 4.7
  • FIXED: Undefined index: repair and repair_period

Version 2.78

  • FIXED: escapeshellcmd on Windows. Props Gregory Karpinsky.
  • FIXED: Move wp_mkdir_p() up before if check. Props Scott Allen.

Version 2.77

  • FIXED: Blank screen downloading backup
  • FIXED: Remove MySQL Version check to display tables stats

Version 2.76

  • NEW: Add wp_dbmanager_before_escapeshellcmd action just before escapeshellcmd()
  • FIXED: Missing / for Windows

Version 2.75

  • FIXED: When activating the plugin, copy index.php to the backup folder
  • FIXED: If you are on Apache, .htaccess will be copied to the backup folder, if you are on IIS, Web.config will be copied to the backup folder
  • FIXED: When choosing 1 Month(s) for Backup/Optimize/Repair, the next date calculation is wrong

Version 2.74

  • FIXED: escapeshellarg() already escape $, no need to double escape it

Version 2.73

  • FIXED: Unable to backup/restore database if user database password has certain special characters in them

Version 2.72

  • FIXED: Use escapeshellcmd() to escape shell commands. Props Larry W. Cashdollari.
  • FIXED: Do not allow LOAD_FILE to be run. Props Larry W. Cashdollari.
  • FIXED: Uses dbmanager_is_valid_path() to check for mysql and mysqldump path. Fixes arbitrary command injection using backup path. Props Larry W. Cashdollari.
  • FIXED: Uses realpath() to check for backup path. Fixes arbitrary command injection using backup path. Props Larry W. Cashdollari.

Version 2.71

  • NEW: Bump to 4.0

Version 2.70

  • New: Uses WordPress 3.9 Dashicons
  • NEW: Allow you to hide admin notices in the DB Options page
  • NEW: Allow Multisite Network Activate
  • NEW: Uses WordPress uninstall.php file to uninstall the plugin
  • NEW: Uses wp_mail() to send email instead of PHP mail()
  • NEW: New From E-mail, From Name & Subject template
  • FIXED: Issues with email from field if site title contains , (comma)
  • FIXED: Notices

Version 2.65

  • FIXED: Set default character set to UTF-8. Props Karsonito

Version 2.64

  • FIXED: Use intval() instead of is_int() when checking for port number. Props Webby Scots

Version 2.63 (03-05-2011)

  • NEW: Added Auto Repair Functionality
  • NEW: Added nonce To All Forms For Added Security

Screenshots

  1. Admin - Backup DB
  2. Admin - Empty/Drop Tables In DB
  3. Admin - DB Information
  4. Admin - Manage DB
  5. Admin - Optimize DB
  6. Admin - DB Options
  7. Admin - DB Options
  8. Admin - Repair DB
  9. Admin - Run Query in DB

Frequently Asked Questions

My database is not backed up / My backup file is 0Kb

  • Ensure that your host allows you to access mysqldump. You can try to narrow the problem by Debugging via SSH:
  1. In wp-dbmanager.php
  2. Find check_backup_files(); on line 246
  3. Add below it echo $command;
  4. Go to WP-Admin -> Database -> Backup
  5. Click Backup
  6. It should print some debugging statements
  7. Copy that line than run it in SSH
  8. If you need help on SSH contact your host or google for more info

What is the difference between WP-DBManager and WP-DB-Backup?

  • WP-DBManager uses mysqldump application to generate the backup and mysql application to restore them via shell.
  • WP-DB-Backup uses PHP to generate the backup. In some cases WP-DB-Backup will work better for you because it requires less permissions. Not all host allows you to access mysqldump/mysql directly via shell.
  • WP-DBManager allows you to have automatic optimizing and repairing of database on top of backing up of database.

Why do I get the message "Warning: Your backup folder MIGHT be visible to the public!"?

  • Ensure that you have renamed htaccess.txt to .htaccess and placed it in your backup folder (defaults to wp-content/backup-db/)
  • If you are 100% sure you have did that and have verfied that the folder no longer is accessible to the public by visiting the URL http://yousite.com/wp-content/backup-db/, you can safely disable the notice by going to WP-Admin -> Database -> DB Options and set Hide Admin Notices to Yes.

wp-dbmanager's People

Contributors

arunbasillal avatar christophherr avatar flickster avatar kalligator avatar karsonito avatar lesterchan avatar liambailey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wp-dbmanager's Issues

dbmanager wont delete old backup files

dbmanager won't delete old backup files.
Maximum Backup Files is set to 12, but they are never deleted.
Is there any logging of the attempts to delete? Perhaps there would be a clue there. I suspect a file system permissions issue, but all is green on the "Backup DB" page in wp-admin. "Excellent. You Are Good To Go."

Using version 2.77 with Wordpress 4.6.1, but I've had the same issue for many earlier versions too.

Any ideas?

[Feature request] Name/Rename Backups

I would love the ability to name backup files prior to backup or alternatively, and/or to rename them after backup to help me remember specific points that the backup represents.

Multisite support

Please do multisite support. Plugin menu in super admin network console

Problem with sanitize_file_name

This function is used when downloading a backup file to verify the file name. In my wp installation, another plugin overrides this function to add a unique string.

As a result, file download does not work.

You probably need to use this function to generate the file name when creating the backup.

Backups no longer being created

Hi,

I'm no longer able to make backups using the plugin. I installed the latest version to a new site on my server and backups are 0 bytes (or 20 bytes zipped). I tried on another site on the same server that was running 2.71 and that worked OK, but when I upgraded to 2.74 the same problem started.

On another site when I tried, I got a specific error about escapeshellarg() not being available. Is it possible some of the functions used since 2.71 are, for security reasons, not available in all PHP installations?

Thanks,
Will

Daily backup database in WordPress 4.1 is performed multiple times

From December 24 DBManager my every moment makes a copy of the database and sends it by e-mail, despite the existence of only one task in WP_Cron. The task set to 13:00 each day is done until 20:00. I can not locate the cause, the server logs there are no errors (eg. Timeout or something similar). WordPress v4.1. Please help.

Wp-dbmanager breaks on folders it can't access because of permissions

I'm not sure if this problem is what broke wp-cron, or just only uncovered when trying to fix a broken wp-cron - but it seems wp-dbmanager doesn't handle folders it can't access very well.

Running wp cron event run --due-now to fix a broken cron got me endless loops of:

Warning: readdir() expects parameter 1 to be resource, bool given in /home/{...}/wp-content/plugins/wp-dbmanager/wp-dbmanager.php on line 392

I disabled wp-dbmanager and tried again, which gave me the alert that I couldn't write to specific folders. Turns out I was running as the wrong user, and with the right user all was good.

Looked at the code anyway, and see that the lines around 392 in wp-dbmanager don't check for the false returned by opendir if $folder doesn't exist or is banned by permissions.

I could do a PR to check it in place, but think the check should probably be at a higher level as is_emtpy_folder seems inappropriate for what should be 'is_writeable' or something.

simplify interface

glad i found this plugin, but i think the UI could be simplified quite a bit by adding a table column of checkboxes (not radios) to the 'Database' page with Empty, Drop, Repair and Optimize buttons at the bottom of the page

this would eliminate the need for the other 3 pages

.htaccess

I am new to wordpress and maybe my remark is irrelevant. Is the .htaccess with allow/deny compatible with Apache 2.4? I noticed in some other plugins we have smth like:
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from all
< /IfModule>


Require all denied
< /RequireAll>

Not saving dbbackup path

I'm using WP 4 and the latest version of your plugin but can't get the dbbackup path to save. Any ideas?

RFE: REST API

I would like to see the ability to perform backups and control other aspects of this plugin from a RESTFUL API. This would assist automated systems in performing scheduled deployments and rollbacks.

Warning always shows

Any time wp-dbmanager is active, the warning below shows:

Your backup folder MIGHT be visible to the public
To correct this issue, move the file from /home5/quicksi7/public_html/wp-content/plugins/wp-dbmanager/htaccess.txt to /home5/quicksi7/public_html/wp-content/backup-db/.htaccess

After a restore of my site, the warning appeared. I used an ftp program to make the instructed changes, but the warning will never go away unless I deactivate wp-dbmanager.

Any suggestions for how to get rid of the warning while wp-dbmanager is active?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.