Skip to content

gturpin-dev/wp-cli-dump-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP-CLI Dump Command

This repo adds a dump command to WP-CLI. It allows you to dump multiple things from your WordPress installation into a single file. The following things can be dumped:

  • Database
  • Plugins
  • Must-Use Plugins
  • Themes
  • Or the entire wp-content directory

TODOs and ideas

List of all commands with hierarchy:

  • wp dump export all ( generate a zip with all dumps below ( named "full_xxx" ? ) )
    • On each export, remove the possibility to customize the name of the file as it is used to manage the List Table
      • wp dump export database
      • wp dump export themes
      • wp dump export plugins
      • wp dump export uploads
      • wp dump export languages
  • wp dump import all ( import a generated zip by the "export all" command )
    • wp dump import database
    • wp dump import themes
    • wp dump import plugins
    • wp dump import uploads
    • wp dump import languages

Todos

  • Find a way to implements all these commands with DRY as possible
  • Maybe use WP_List_Table to list the dumps in option page
    • Add a button to download the dump
    • Add a button to delete the dump
    • The list should be paginated
    • The list must have filters by their type (database, plugins, themes, uploads, languages)
    • The list must have a search input
    • The list must handle bulk actions (delete, download)
    • Each dump must have a column with the date of creation
  • Make sure the dumps are deleted in X days
    • Add a setting to change the number of days in a hook or in the option page
  • Add an option to perform a search-replace in the database dump ( create a backup, perform the search-replace, create the dump, reimport the backup and then delete the backup )

SECURITY

  • Check if it's possible to get the link of the dump file by guessing the name and download it
    • If yes, try to find a way to prevent it
    • Maybe need to change the way to download the file from the admin area
  • When the plugin is deleted, delete all the dumps ( Not on deactivation to prevent bad behavior )

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages